·
27 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changes (Release 5.7.1)
Summary (pypdfium2)
- The pdfium update fixes a regression in
FPDFText_GetLooseCharBox()/PdfTextPage.get_charbox(i, loose=True)results introduced in the previous release. (Since conda pdfium-binaries are updated only once a month, this release downgrades to pdfium7713on conda) - Fixed an oversight in the CLI that caused
pypdfium2.__init__to run before preparation after all. This had regressed shortly before the previous release.DEBUG_AUTOCLOSE=1 pypdfium2 -hshould now showInitialize PDFiumat first. - Changed output string handling once more, as even slicing the buffer directly still implies a copy – so let's use
memoryviewandcodecs.decode()instead. Also, we now create buffers of the expected type directly to avoid casts, and convert number of bytes to units via ceil division where needed. Updated the Readme's raw API examples accordingly. PdfTextPage.get_text_bounded()no longer unconditionally callspage.get_bbox()each time. Instead, call it only if needed, when at least one of the boundary values is None.
If all bounds are given, skip the call. This eliminates extra overhead whenget_text_bounded()is called many times on given rectangles, like fromPdfTextPage.get_rect(). Though the API probably is not meant to be used this way.
ConsiderPdfPage.get_objects(filter=(FPDF_PAGEOBJ_TEXT,))andtextobj.extract()as a possible alternative.- Added
PdfFont.is_embeddedproperty.
pypdfium2 commit log
Commits between 5.7.0 and 5.7.1 (latest commit first):
8980e64[autorelease main] update 5.7.16f9d5d4Update static clang images to 22.1.3.025efe1bjust check: skip htmlcov dire50ba09Readme: Update raw API output strings examples570a437Prepare changelog62e3b97Mark next release as humble (minor cipher update)8cd9947get_text_bounded(): defer get_bbox() and point out whye0570ffnit: use == 1 rather than bool()fa866dfAdd PdfFont.is_embedded propertyc67d34cSimplify _ENC_ERRHANDLER passing717999bImproved coverage reporting8cde38cRework output strings: use memoryview and codecs.decode, avoid casts (#425)a6705a3fix: don't import from pypdfium2 before logging setupc07697btests: forward rather than wrapd765528cibw: update comment on windows arm95e7211get_text_bounded: avoid cast, create c_ushort array directly8e5f396build(deps): bump actions/upload-pages-artifact from 4 to 500e729ebuild(deps): bump cross-platform-actions/action from 0.32.0 to 1.0.01ecd0e6Fix internal use of deprecated API7fcf2a5nit: use iterator comprehension241673bMinor doc updates
PDFium commit log
Commits between 7776 and 7802 (latest commit first):
2558d5d97Bound FPDFText_GetLooseCharBox() top/bottom by /FontBBox02318a973Add test for FPDFText_GetLooseCharBox() behavior with bad ascent value237fcde80Add a test to demonstrate a PDF flattening bugb28cdcbd7Replace CHARSET_FLAG macros with CharsetFlag enum4e99d1542Roll third_party/harfbuzz/src/ fa2908bf1..4fc961392 (694 commits)bd1864057Remove XFA_ELEMENT_SUBMIT_ENABLED codea05c20f2fAvoid check in CPDF_SecurityHandler::GetUserPassword().a7a57805fReplace macro-based modifiers with WSTRModifiers enumf1993648aUse a result struct in CBC_TwoDimWriter classes.1cc96739eRemove CPDFSDK_FormFillEnvironment::GetFormFillInfo()1cd0c70c4Update siso_version to 7bcc56206d234b3024df08ffd4ee6d40eea32623a2a7ceb05Fix NULL-deref in CXFA_ViewLayoutProcessor::BreakOverflow()ee9b1a479Remove FFI_ from CPDFSK_FormFileEnvironment::FFI_GetAppName().50905070dPatch another overflow in libtiff0dd0a31f9Roll Code Coverage from 839c826036d4 to f9e72c2a3ad1 (7 revisions)200b8881cRoll Catapult from 6ea42cfd29b4 to 7343182d94b7 (50 revisions)f1ce6ba0dChange CXFA_TextProvider::GetEmbeddedObj() to take a string viewf1d868b94Roll abseil, build, buildtools, clang and rust4e18cc00cUpdate gn_version to 6e8dcdebbadf4f8aa75e6a4b6e0bdf89dce1513aa3c2448b0Convert some PDFium string indexing by [0] to Front()f0fde6136Use fxcrt::Zip() in PDF_RenderStatus::LoadSMask().83c482053Limit the maximum destination image size in CStretchEnginef1e179a5bRoll base/allocator/partition_allocator/ 2157c84d9..8013b1e0c (18 commits)bd341b245Roll third_party/llvm-libc/src/ 044963a25..2a826f2fd (129 commits)3ac598f53Roll third_party/libunwind/src/ db838d918..6ca46ff28 (5 commits)fec55db60Roll third_party/icu/ a86a32e67..ff7995a70 (9 commits)f5142fa98Fix length botch in CPDF_StreamContentParser::FindColorSpace()8536b4348Convert some {Byte,Wide}String::Last() calls to Substr().6f48a06acRoll third_party/skia/ 90b1d0b22..163dfdf50 (278 commits; 42 trivial rolls)bce2e6728Use safe arithmetic in CFX_PSRenderer::DrawDIBits()7302d52cbReturn fixed-size spans from CPDF_TransferFunc.d499e4dfcRoll third_party/nasm/ af5eeeb05..452528587 (2 commits)b76a7ae42Roll v8/ b210c794d..f9659283a (531 commits; 1 trivial rolls)22ac3a9d0Pass fixed-size span to GetBoundary().29ce50207Avoid interleaved load/stores during pixel processing.ac42296caImplement fxcodec::ReverseRGB() using Zip().07b7d6c49Roll goldctl from 4a1223e49952 to a34d51fda106