Skip to content

5.7.1

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Apr 14:59
· 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 pdfium 7713 on 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 -h should now show Initialize PDFium at first.
  • Changed output string handling once more, as even slicing the buffer directly still implies a copy – so let's use memoryview and codecs.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 calls page.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 when get_text_bounded() is called many times on given rectangles, like from PdfTextPage.get_rect(). Though the API probably is not meant to be used this way.
    Consider PdfPage.get_objects(filter=(FPDF_PAGEOBJ_TEXT,)) and textobj.extract() as a possible alternative.
  • Added PdfFont.is_embedded property.
pypdfium2 commit log

Commits between 5.7.0 and 5.7.1 (latest commit first):

  • 8980e64 [autorelease main] update 5.7.1
  • 6f9d5d4 Update static clang images to 22.1.3.0
  • 25efe1b just check: skip htmlcov dir
  • e50ba09 Readme: Update raw API output strings examples
  • 570a437 Prepare changelog
  • 62e3b97 Mark next release as humble (minor cipher update)
  • 8cd9947 get_text_bounded(): defer get_bbox() and point out why
  • e0570ff nit: use == 1 rather than bool()
  • fa866df Add PdfFont.is_embedded property
  • c67d34c Simplify _ENC_ERRHANDLER passing
  • 717999b Improved coverage reporting
  • 8cde38c Rework output strings: use memoryview and codecs.decode, avoid casts (#425)
  • a6705a3 fix: don't import from pypdfium2 before logging setup
  • c07697b tests: forward rather than wrap
  • d765528 cibw: update comment on windows arm
  • 95e7211 get_text_bounded: avoid cast, create c_ushort array directly
  • 8e5f396 build(deps): bump actions/upload-pages-artifact from 4 to 5
  • 00e729e build(deps): bump cross-platform-actions/action from 0.32.0 to 1.0.0
  • 1ecd0e6 Fix internal use of deprecated API
  • 7fcf2a5 nit: use iterator comprehension
  • 241673b Minor doc updates
PDFium commit log

Commits between 7776 and 7802 (latest commit first):

  • 2558d5d97 Bound FPDFText_GetLooseCharBox() top/bottom by /FontBBox
  • 02318a973 Add test for FPDFText_GetLooseCharBox() behavior with bad ascent value
  • 237fcde80 Add a test to demonstrate a PDF flattening bug
  • b28cdcbd7 Replace CHARSET_FLAG macros with CharsetFlag enum
  • 4e99d1542 Roll third_party/harfbuzz/src/ fa2908bf1..4fc961392 (694 commits)
  • bd1864057 Remove XFA_ELEMENT_SUBMIT_ENABLED code
  • a05c20f2f Avoid check in CPDF_SecurityHandler::GetUserPassword().
  • a7a57805f Replace macro-based modifiers with WSTRModifiers enum
  • f1993648a Use a result struct in CBC_TwoDimWriter classes.
  • 1cc96739e Remove CPDFSDK_FormFillEnvironment::GetFormFillInfo()
  • 1cd0c70c4 Update siso_version to 7bcc56206d234b3024df08ffd4ee6d40eea32623
  • a2a7ceb05 Fix NULL-deref in CXFA_ViewLayoutProcessor::BreakOverflow()
  • ee9b1a479 Remove FFI_ from CPDFSK_FormFileEnvironment::FFI_GetAppName().
  • 50905070d Patch another overflow in libtiff
  • 0dd0a31f9 Roll Code Coverage from 839c826036d4 to f9e72c2a3ad1 (7 revisions)
  • 200b8881c Roll Catapult from 6ea42cfd29b4 to 7343182d94b7 (50 revisions)
  • f1ce6ba0d Change CXFA_TextProvider::GetEmbeddedObj() to take a string view
  • f1d868b94 Roll abseil, build, buildtools, clang and rust
  • 4e18cc00c Update gn_version to 6e8dcdebbadf4f8aa75e6a4b6e0bdf89dce1513a
  • a3c2448b0 Convert some PDFium string indexing by [0] to Front()
  • f0fde6136 Use fxcrt::Zip() in PDF_RenderStatus::LoadSMask().
  • 83c482053 Limit the maximum destination image size in CStretchEngine
  • f1e179a5b Roll base/allocator/partition_allocator/ 2157c84d9..8013b1e0c (18 commits)
  • bd341b245 Roll third_party/llvm-libc/src/ 044963a25..2a826f2fd (129 commits)
  • 3ac598f53 Roll third_party/libunwind/src/ db838d918..6ca46ff28 (5 commits)
  • fec55db60 Roll third_party/icu/ a86a32e67..ff7995a70 (9 commits)
  • f5142fa98 Fix length botch in CPDF_StreamContentParser::FindColorSpace()
  • 8536b4348 Convert some {Byte,Wide}String::Last() calls to Substr().
  • 6f48a06ac Roll third_party/skia/ 90b1d0b22..163dfdf50 (278 commits; 42 trivial rolls)
  • bce2e6728 Use safe arithmetic in CFX_PSRenderer::DrawDIBits()
  • 7302d52cb Return fixed-size spans from CPDF_TransferFunc.
  • d499e4dfc Roll third_party/nasm/ af5eeeb05..452528587 (2 commits)
  • b76a7ae42 Roll v8/ b210c794d..f9659283a (531 commits; 1 trivial rolls)
  • 22ac3a9d0 Pass fixed-size span to GetBoundary().
  • 29ce50207 Avoid interleaved load/stores during pixel processing.
  • ac42296ca Implement fxcodec::ReverseRGB() using Zip().
  • 07b7d6c49 Roll goldctl from 4a1223e49952 to a34d51fda106