Skip to content

4.21.0

Compare
Choose a tag to compare
@github-actions github-actions released this 11 Oct 13:47
· 228 commits to main since this release

Changes (Release 4.21.0)

Summary (pypdfium2)

  • PdfTextPage.get_text_range(): Correct the allocation in case of excluded/inserted chars, modify scope to prevent pdfium from reading beyond range(index, index+count) (which otherwise it does with leading excluded chars). Update docs to note the two different representations. Thanks to Nikita Rybak for the discovery ({issue}261).

  • Setup changes (partly ported from the devel branch)

    • ctypesgen fork: replaced the old, bloated library loader with a new, lean version
    • Merged $PDFIUM_VERSION and $PDFIUM_USE_V8 into the existing $PDFIUM_PLATFORM specifier (see Readme for updated description). The relatively minor setup API breakage was considered tolerable; the core library API is not affected.
    • Removed the build package from pyproject buildsystem requires, where it was unnecessary. Thanks to Anaconda Team.
    • Split in two separate modules: pypdfium2 for helpers (pure-python), pypdfium2_raw for the core bindings (data files).
  • Switched PyPI upload to "trusted publishing" (OIDC), which is considered safer. Further, the core maintainers have set up 2FA as requested by PyPI.

Note: Earlier releases may fail to install from source due to API-breaking changes to our ctypesgen fork (see {issue}264). Where possible, avoid source installs and use the wheels instead (the default behavior). If you actually have to do this, consider --no-build-isolation and pre-installed dependencies, including ctypesgen prior to commit 61c638b.

pypdfium2 commit log

Commits between 4.21.0b1 and 4.21.0 (latest commit first):

  • 0f17303 [autorelease] update changelog and version file
  • 3e4127a Prepare changelog for release
  • a76b4b8 Temporarily pause autorelease
  • f143916 nit: code comments
  • 28be13b Abbreviate platform->plat system->sys
  • 979f12e Expand renaming (binary -> platform, prefer abbrevs)
  • b2ce32c Retain $PDFIUM_PLATFORM env var
  • a809333 Use default src include if all modules given
  • 4ae0661 Don't generate what we don't use
  • 747b726 setup_base nits
  • cf817e3 Make check-wheel-contents happy, update changelog
  • 36701a6 Move raw bindings to separate module (CC #256)
  • 89aaf06 ctypesgen nit: align order of defines
  • 60ff803 setup: switch mostly to glob import
  • 88281ae Update tasks
  • c80b912 Add _WIN32 only if on a windows host
  • ceafb41 ctypesgen: try to expose windows-only members on windows
  • 51d1b4e ctypesgen: set compile-libdirs if possible
  • cd5cfc6 Skip symbol guards, except for reference bindings
  • bbcd3a1 readme: fix typo found by codespell
  • 7e0145d setup: align libnames
  • 28f6865 setup: restrict ctypesgen to fork
  • 3530d74 Port setup changes from devel branch (#262)
  • a99aec0 Add note on test case failing with pdfium 6015
  • 456899c [Hotfix] get_text_range: don't lose l_passive (CC #261)
  • 3d23c56 Update changelog (CC #261)
  • fdf95fc Update docs for get_text_range() (CC #261)
  • 535398d Continue on #261
  • a9c6485 Partially fix #261
  • 339e0b1 readme: GH pages nit
PDFium commit log

Commits between 6002 and 6056 (latest commit first):

  • edf48f97b Tidy UnownedPtr<> as a result of previous simplification.
  • 4e17899bb Adjust guard macros around PdfiumSpanDeathTest.DanglingReference.
  • 1e7353640 Remove ProbeForLowSeverityLifetimeIssue() from UnownedPtr.
  • 7b7a48c4b Always use base::raw_ptr<> implementation when PartitionAlloc is present
  • 3476811a8 Shorten PartitionAlloc includes.
  • 6c5202203 Apply pdfium_core_config to fuzzer_init_public
  • dc4e60e8e Fix dangling ptrs in embeddertest found by BRP dangling ptr detector.
  • 72637154d Update android_toolchain_version to NSOM616pOQCfRfDAhC72ltgjyUQp9lAWCMzlmgB18dAC
  • e130a1431 Add missing UnPreMultiply() call when processing transparencies
  • e3593d647 Avoid rendering into the device in CPDF_RenderContext::GetBackground()
  • 820848e16 Roll abseil, build, buildtools, clang, and libcxx together
  • 5e3018d79 Roll Fuchsia SDK from 14.20230826.1.1 to 15.20230930.1.1
  • b2f8486e8 Roll v8/ 7584acae2..3eb7d73cb (370 commits)
  • 77b1d8a97 Roll base/trace_event/common/ 147f65333..29ac73db5 (1 commit)
  • 4ff3bdb95 Roll third_party/libunwind/src/ a321409e6..7608093d2 (14 commits)
  • 1d94005e9 Roll third_party/freetype/src/ 000b26a30..7b308a29d (25 commits)
  • 1c7fcc4d3 Roll third_party/skia/ 0a253625a..d8ec08c6d (499 commits)
  • cd93aa4bf Update gn_version to 991530ce394efb58fcd848195469022fa17ae126
  • 40c0ea26c Roll third_party/libc++abi/src/ aae4ca0f5..e8e4eb8f1 (17 commits)
  • c8f9d23f8 Roll base/allocator/partition_allocator/ b22ccba48..2f4afa63f (42 commits)
  • 8cf636e15 Roll Catapult from f16ca3c78e46 to 4f81c1e29597 (79 revisions)
  • 5cdaf28d0 Skia: Call UnPreMultiply() in FPDF_RenderPage()
  • 1d550b829 Add new public API FPDF_GetDocUserPermissions
  • 1aa7ef9f9 Rename FPDFPage_Move() to FPDF_MovePages()
  • b3dea94ae Add MovePages API to rearrange pages in a PDF document.
  • 9b17e472e Match pixel-based tests against both the GDI and default renderer
  • 4bf7922ac Slightly simplify CFX_DIBitmap::UnPreMultiply()
  • 60dfe9b0a Avoid some unnecessary SharedCopyOnWrite copies
  • 503690367 Add FPDFDocEmbedderTest.DeletePageAndRender test case
  • c5c06c3a6 This change fixes an issue in CPDFXFA_Context::DeletePage.
  • 033126e7f Remove redundant code in CFX_SkiaDeviceDriver dtor
  • db20d00b8 Combine CPDF_DeviceBuffer::Initialize() and GetBuffer()
  • e47319725 Always check CFX_RenderDevice::CreateCompatibleBitmap() return value
  • 3753799bf Simplify XFA_DrawImage() and related code
  • 960d65600 Improve CFX_SkiaDeviceDriver ctor error handling
  • 5fbd16426 Make the DebugValidate() checks used by CFX_SkiaDeviceDriver less strict
  • 40ee07642 Check CFX_DIBitmap::Create() result in ProgressiveDecoder
  • 1a19bbed8 [Fuchsia] Remove fuchsia_target_api_level from .gn
  • 3145a9b91 Unsuppress several passing GDI tests
  • 1dc2fc989 Remove unreachable code from CFX_DIBBase::ConvertTo()
  • 700b9fbf8 Modernize parts of CPDFSDK_AnnotIterator
  • b5bc2e929 Refine FPDFImageObj_GetBitmap() behavior
  • 372d25d7d Roll Zlib from f5fd0ad2663e to 235986452b31 (1 revision)
  • 71c92d906 Roll Depot Tools from 427f0f43ad0c to d7ba85d1eb58 (39 revisions)
  • b22fc9a07 Don't implement CPDF_DIB::GetBuffer() (try 2)
  • 55835a2c6 Use fxge::CalculatePitch8() in more places
  • e29681f11 Make graphics resource names share-on-write
  • 0cfa0a76d Avoid another PartitionAlloc allocator shim incompatibility
  • 331f2dcff Add an embedder test for crbug.com/pdfium/1893
  • 01175ba1d Update third_party/base/sys_byteorder.h
  • 07c64fda1 Remove some NOTREACHED() usage in core/fpdfapi/parser directory
  • c186235a1 Rename CPDF_ImageLoader::HandleFailure() to Finish()
  • 1e1e17305 Fix unusable FPDFBitmap_GetBuffer() return values
  • a098449f6 Remove FXRC_BITMASK_OUTPUT
  • 806593eef Use spans in CFX_Palette getters
  • 010031c98 Clean up CFX_Palette
  • 9eec95782 Improve invalid ICC profile handling
  • 75ff13168 Reinstate CPDF_FormField DCHECKs and improve SetValue()
  • a836c20b8 Move CPDF_ColorSpace::IsValidIccComponents() to IccTransform
  • f74bf767b Update reclient version to re_client_version:0.114.2.81e819b-gomaip