Skip to content

Releases: pypdfium2-team/pypdfium2

5.3.0

05 Jan 16:28
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Changes (Release 5.3.0)

Summary (pypdfium2)

  • Fixed inclusion of loongarch64 build in GH attestation. This was an oversight in the workflow.
  • ppc64le (glibc) is now built at pdfium-binaries using upstream's tooling.
    This means pypdfium2's conda builds now also support this platform.
    Updated pypdfium2's setup/workflow accordingly to use the pdfium-binaries.
pypdfium2 commit log

Commits between 5.2.0 and 5.3.0 (latest commit first):

  • 04b411a [autorelease main] update 5.3.0
  • a34e0c0 resources.rc: set just the year, remove -present
  • db1d891 Bump copyright year
  • 52a4689 build_native: order functions as they are called
  • 7e2f78f build_native: a few more enhancements
  • 67f4874 build_native: move legacy_libs_compat patch to proper place
  • 1ab4ce4 build_native: apply container compat patch only where necessary
  • 6967832 Drop now-unused patches
  • 5dbd1f2 get_cross_deps: map ppc64
  • 9b87ea9 Patchless ppc64(le) build
  • 994125d Platform detection hotfix
  • f5d3795 Bump pdfium pin to 7592 to make ppc64le work
  • d0f4b03 ppc64(le): use the pdfium-binaries
  • 29b697b Somewhat simplify utils/get_gcc_prefix.py
  • b9bbab6 fix: include loongarch64 build in GH attestation
  • 32aa336 build(deps): bump actions/download-artifact from 6 to 7
  • 35b4f4c build(deps): bump actions/upload-artifact from 5 to 6
  • c983a6c another pyproject.toml/cibw correction
  • f60638e readme nit
  • 8ba2e9b cibw: fix dnf clean/makecache logic
PDFium commit log

Commits between 7568 and 7616 (latest commit first):

  • 99b9fd3b0 Add new span versions of CJBig2_Image::GetLine()
  • adab0df23 Rename CJBig2_Image::GetLine() to GetLinePtr()
  • f3518ab0a Consolidate identical compose code in CJBig2_Image
  • cb05cb24e Use unsigned bit position in FaxModule::FaxG4Decode()
  • 83b6a77b0 Remove some UNSAFE_TODO() usage in CJBig2_Image
  • 31da67588 Loosen restriction on CJBig2_Image::span()
  • 74eeccad8 Add EmbedderTest::CompareBitmapToPng*() to check against PNGs
  • 8e788692d Get rid of remaining UNSAFE_TODO() usage in faxmodule.cpp
  • acff14385 Get rid of UNSAFE_TODO() usage in FaxFillBits()
  • fc16d1902 Get rid of more UNSAFE_TODO() usage in faxmodule.cpp
  • 034ec4eda Add CJBig2_Image::has_data()
  • 67c76beb2 Clang-format code
  • 068862d16 Test ToUnicodeMap bfrange behavior when the dest code goes above 0xffff
  • 87fa82919 Remove a StringToCode() call in CPDF_ToUnicodeMap::HandleBeginBFRange()
  • 1012d41af Add the complete list of clang GCS entries
  • ae78a837f Clean up some paths in testing/BUILD.gn
  • 41d163ef0 Make CPDF_ToUnicodeMap::ReverseLookup() faster
  • 01a17c1ce Turn off more raw-ptr bits when pdf_use_partition_alloc=false
  • 3b52741bc Stop reading arm_use_neon
  • c62b86c55 Make UnownedPtr work with implicit ctor
  • f75eb7b9b Reduce the scope of UNSAFE_TODO() macros in cstretchengine.cpp
  • 5cb9c7591 Get rid of UNSAFE_TODO() usage in FaxEncoder
  • 403e0e78b Roll third_party/skia/ a9e9573a3..279bb3648 (208 commits; 38 trivial rolls)
  • b8c2e9a17 Do IWYU for stdint.h in //fxbarcode headers
  • 5ea29fc0d Change UnownedPtr's raw pointer ctor to be non-explicit
  • 8c7780d85 Use more scopers within EmbedderTest
  • 9823c4f57 Update RenderTransparencyOnWhiteBackground test
  • 49a2ab87d Remove out-parameters from testing/utils/path_service.h methods
  • 0a981f049 Switch to backticks in comments in testing/embedder_test.h
  • 750df1d21 Avoid direct raw_ptr use in fpdf_editpage.cpp
  • ccb1bef3e Roll simdutf from acd71a451c1b to 75bea7342fda (2 revisions)
  • 23120ca1c Roll Code Coverage from 9e4876df273e to fc75c61d3a98 (1 revision)
  • 83bf49b9e Delete useless CFX_GlyphCache::RenderGlyph_Nativetext()
  • d2b86b098 Remove unused enum FontAntiAliasingMode values
  • dc836edce Merge nearly identical code into SkFontFromCFXFont()
  • 31fc45e3a Overwrite the timezone for JS/pixel/corpus tests on macOS
  • 48a78762a Handle multiple plus and minus signs in string to num conversions
  • dd9b48378 Update StringToFloatImpl() template class name
  • 757a4d855 Add tests for multiple leading signs for string to num conversions
  • 801ef71fa Roll third_party/icu/ f27805b7d..a86a32e67 (1 commit)
  • f72e4722b Roll base/allocator/partition_allocator/ 2f4069fb8..e711e98fa (37 commit...
Read more

5.2.0

12 Dec 13:19
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Changes (Release 5.2.0)

Summary (pypdfium2)

  • Added new builds android_{arm64_v8a,armeabi_v7a}, {many,musl}linux_{ppc64le,riscv64,loongarch64} and musllinux_armv7l to the release process. This greatly improves platform support. Loongarch is only uploaded to GH, as PyPI doesn't accept it yet. Replaced musllinux_{x86_64,aarch64,i686} with our own builds, as they are a bit smaller than the pdfium-binaries.
  • Build s390x this once through emulated gcc, because static clang doesn't seem to produce working builds for this target. We may not be able to continue doing this.
  • build_native.py: Added full dependency library vendoring abilities. This is now the default behavior on fallback setup. Integrated ninja/gn bootstrapping helpers.
  • CIBW workflow: Use vendored libraries for most Linux targets. Build ppc64le, riscv64, loongarch64 (and theoretically s390x) using static clang that runs on the host architecture (even though from within an emulated container), while being pre-configured for cross-compilation to the target architecture. This is much faster than building with an emulated compiler. Many thanks to Matthieu Darbois (mayeut) of pypa/manylinux for coming up with this approach.
  • Greatly simplified verification of pdfium-binaries attestation in pypdfium2's setup. Thanks to Benoît Blanchon for attaching the attestation as artifact.
  • Enabled immutability for pypdfium2's GitHub releases, and added build provenance attestations, like pdfium-binaries did.
pypdfium2 commit log

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

  • c774578 [autorelease main] update 5.2.0
  • be30e32 cibw: attempt to make package install more reliable on RHEL-based images
  • f5cc6af Temporarily enable s390x (emulated gcc) for v5.2.0
  • 23efe69 Readme update (native sbuild / cibw)
  • 25213b7 sbuild.yaml: hardcode glibc, add legacy manylinux2014 tag
  • 5d47540 Slightly update main.yaml
  • 4270a1a textpage/docs: move note about line breaks
  • 6ef7916 sbuild_native: remove stale, unused input
  • 130fa06 Revert "Update changelog"
  • 1cce831 workflows: auto-adapt branch
  • 02f224a Update changelog
  • 760ac8e conda.yaml: add ability to set ref
  • 03c3f43 main.yaml/augment: fix emulated
  • 1b66381 main.yaml/augment: set fail-fast: false
  • 8904ad3 main.yaml: formatting / ws
  • d92a097 main.yaml/augment: reorder targets
  • 2b2e900 sbuild_one: run apt-get update
  • f66cad2 main.yaml: attempt to deduplicate augment step
  • 2e9b9dd main.yaml: add s390x, commented out
  • c11acd2 autorelease: clarify pdfium update message
  • 100ff5b Attempt to fix conda
  • 05f5006 Add explanation why TestPyPI is currently commented out
  • 6905727 ppc64le: add manylinux2014 tag
  • 356165f changelog correction
  • b557aa5 Put changelog in GH release desc after all, follow usual process
  • d3716fa Manually fix changelog
PDFium commit log

Commits between 7557 and 7568 (latest commit first):

  • e3c8ca828 Remove some unused includes of cfx_font.cpp
  • 43df95591 Roll corpus tests again
  • accc1fb03 Add premultiplied alpha support to test_runner.py
  • 9a6d63b87 Add premultiplied alpha support to pdfium_test
  • 1aa30337f Improve pdfium_test --png implementation
  • 31a6ce372 Reduce the number of parameters in pdfium_test's WriteFoo() functions
  • 5a2aa46d0 Simplify static_assert() statements in fpdf_view.cpp
  • 3de86cb44 Simplify SetRendererType()
  • a8882bc9d Unified GetFooParamValue() and SetFooParam() implementations
  • 62c90734f Remove some stray FreeType-related usage
  • 040aa1292 Use uint32_t for font face indices instead of size_t
  • c122e190f Reuse InitializeFreeType() on Android
  • 97d1584ea Move FreeType code out of cfx_fontmgr.cpp
  • ab91cd971 Remove FT_UInt usage in cfx_unicodeencodingex.cpp
  • a1229dedd [rust png] Fix handling of discard_transparency in EncodeBGRAPNG.
  • 287d53eaa [Skia] Handle odd-sized dashed line arrays correctly
  • dc264b3b7 [AGG] Handle odd-sized dashed line arrays correctly
  • c8a09ecb0 Update pdfium_is_standalone description in README.md
  • 2edb4ecda Roll libpng from 84d676669166 to a79803bfd168 (2 revisions)
  • 44a06aa38 Generate build_with_chromium variable via //DEPS
  • 66c6bc409 Roll Skia and update serial proc return value
  • 42476eac4 Roll Zlib from 5aa617372945 to 63d7e16739d8 (1 revision)
  • 2c9001241 Roll goldctl from dcfa817da658 to 68c457e302c1

5.2.0b1

02 Dec 14:09
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Changes (Release 5.2.0b1)

Summary (pypdfium2)

  • Updated PDFium from 7529 to 7557.
  • Added new builds android_{arm64_v8a,armeabi_v7a}, {many,musl}linux_{ppc64le,riscv64,loongarch64} and musllinux_armv7l to the release process. This greatly improves platform support. Loongarch is only uploaded to GH, as PyPI doesn't accept it yet. Replaced musllinux_{x86_64,aarch64,i686} with our own builds, as they are a bit smaller than the pdfium-binaries.
  • build_native.py: Added full dependency library vendoring abilities. This is now the default behavior on fallback setup. Integrated ninja/gn bootstrapping helpers.
  • CIBW workflow: Use vendored libraries for most Linux targets. Build ppc64le, riscv64, loongarch64 (and theoretically s390x) using static clang that runs on the host architecture (even though from within an emulated container), while being pre-configured for cross-compilation to the target architecture. This is much faster than building with an emulated compiler. Many thanks to Matthieu Darbois (mayeut) of pypa/manylinux for coming up with this approach.
  • Greatly simplified verification of pdfium-binaries attestation in pypdfium2's setup. Thanks to Benoît Blanchon for attaching the attestation as artifact.
  • Enabled immutability for pypdfium2's GitHub releases, and added build provenance attestations, like pdfium-binaries did.
pypdfium2 commit log

Commits between 5.1.0 and 5.2.0b1 (latest commit first):

  • c1e05fc [autorelease main] update 5.2.0b1
  • 221756a autorelease/config.json: unset humble, set beta
  • 6554cbc Tried to delete tags after all
  • eb5e884 Attempt fix for augmented builds version blunder
  • 0bf7f1f Next issue
  • 6a47cee [autorelease main] update 5.3.0
  • 47da5cd Fix blunder in publish step
  • 0b46c59 [autorelease main] update 5.2.0
  • 30f86fd Improve changelog wording
  • 236e52c Add gh_only/ to .gitignore
  • 002ad34 pyproject.toml: add comment
  • 10308e7 Augment releases with our own builds (#398)
  • 063e40b main.yaml: set immutableCreate: true
  • c376f7a Don't needlessly call platform.{mac,win32,android}_ver()
  • 5e8b20a Lean & reliable attestation verification
  • e285ceb main.yaml: add build provenance
  • 7482c55 build(deps): bump actions/checkout from 5 to 6 (#397)
  • 5c7eef8 bootstrap_buildtools(): logging
  • 8e45268 cibw: vendor dependency libraries, except on s390x
  • 654564b build_native: full dependency lib vendoring abilities
  • f108424 Revert s390x again
  • 099b623 cibw/clang: generally do not vendor libc++
  • 50a7319 Test if s390x might work if we don't vendor the libc++
  • 8e2ade5 cibw/s390x: back to emulated gcc
  • 5820626 Update some comments
  • d637bf4 Update changelog
  • 616ad3f build_native: update another comment
  • 8683ca1 build_native: remove comment
  • 91f0f43 Fix typo
  • a91a189 Fix needless f-strings again
  • 9f27f61 Don't system_libcxx_with_clang.patch if libc++ is vendored
  • 6c7a287 cibw.yaml: enable clangcross targets by default
  • d90f886 build_native: update comment on --vendor
  • a6a215b Update CIBW workflow
  • 875d114 Don't vendor libc++ on musllinux
  • a808974 Apply avoid_new_clang_flags.patch only if needed
  • 778c830 Extend no_libclang_rt patch
  • 3a72eda Attempt static clang for ppc64le,s390x,riscv64,loongarch64
  • 016ebbf sbuil.yaml: add missing tag to macos_native_x64 testtarget
  • 08e6d66 readme/raw api: avoid leftover sized pointer
  • df00279 get_gcc_prefix: avoid needless f-string

5.1.0

23 Nov 13:36

Choose a tag to compare

Changes (Release 5.1.0)

Summary (pypdfium2)

  • Added new helpers textpage.get_textobj(), PdfTextObj and PdfFont.
    These helpers currently just cover font info and object-level text extraction, but may be extended in the future.
    For objects of type FPDF_PAGEOBJ_TEXT, PdfPage.get_objects() and the PdfObject constructor will now return PdfTextObj rather than just PdfObject instances.
    Thanks to Mykola Skrynnyk for the initial proposal.
  • Rolled back musllinux tag from 1_2 to 1_1. This was erroneously incremented shortly before 5.0.0, but the pdfium-binaries do still run on musllinux_1_1, probably because they're statically linked.
  • build_toolchained: Significant portability enhancements. Should now work on Linux CPUs that are unhandled/incomplete upstream (e.g. aarch64). Also, building on Windows arm64 natively may now work. Added ability to cross-compile ppc64le from x86_64. Removed --use-syslibs option (use build_native instead).
  • build_native: Fixed Python 3.6/3.7 compatibility. Added --no-libclang-rt option.
  • Setup: Fixed inclusion of BUILD_LICENSES/ sub-directories. Added extra licenses for DLLs pulled in by auditwheel. This concerns sourcebuilds/cibuildwheel only. The wheels on PyPI are unaffected.
  • Added android targets to sbuild.yaml workflow. This does not impact releases, which still use the pdfium-binaries.
  • Added i686 (manylinux and musllinux) to cibuildwheel workflow.
    Use an arm64 host (GHA ubuntu-24.04-arm) for armv7l builds, which is much faster than with an x86_64 host. Added armv7l manylinux target (previously just musllinux).
    This does not impact releases yet, but it may in the future.
  • CI: Migrated from macos-13 to macos-15-intel.
pypdfium2 commit log

Commits between 5.0.0 and 5.1.0 (latest commit first):

  • 46afdae [autorelease main] update 5.1.0
  • d6d1ea5 build_toolchained: set config var regardless of sync
  • 1054d12 Update RTD build host
  • 0c2eef0 build_toolchained: update comment
  • 346bba0 build_toolchained: use PORTABLE_MODE on musllinux and android
  • edad47e main.yaml: add ref to upload-artifact bug
  • 24aea3c Update changelog again
  • 6bc04d3 main.yaml: propagate py_version
  • 28639a5 Add a comment
  • 5c93651 Readme: update sourcebuild section
  • 49404d2 Fix reuse lint
  • 7cb5bc0 Fix bootstrap_ninja()
  • b4f2bc6 Extract non-split-related work from PR #394
  • d839e2e Defer _get_local_bin()
  • 6be8ad0 build_toolchained: in PORTABLE_MODE, use bootstrap_buildtools()
  • 6fb248b Make bootstrap_gn target dir portable
  • 1613353 Add proper ninja/gn bootstrapping functions
  • 6ec44e2 Avoid setup-just action where we can
  • 0cd1f73 Update changelog again
  • 5fc9bb0 sbuild_one: fix artifact naming if target_os is set
  • 3998f82 pdfium-binaries/android: bump to android_23
  • a645230 sbuild.yaml: attempt adding android builds
  • c739b22 build_toolchained: continue
  • a86826f build_toolchained: limit PORTABLE_MODE to Linux for now
  • 2c8bd51 sbuild_one: drop just dependency
  • 1bcc02a Update changelog
  • f60248c chores: fix just check, rename some patches
  • d9f66f0 build_toolchained: more portability fixes
  • 9d32e5f sbuild.yaml: test build_toolchained.py on native arm64 runner
  • f54247c Further build_toolchained improvements
  • 45c8084 build_toolchained.py: add ppc64le cross-comp ability
  • 2d8e00b Improve portability of build_toolchained.py
  • 3eb8204 Remove build_toolchained --syslibs from CI
  • 4c1038b build_native: add option to disable libclang_rt dependency
  • c345690 Readme: somewhat update licenses section
  • f5bff20 Add extra licenses for cibuildwheel builds (#390)
  • 5159278 Clarify and update changelog
  • 7e849de Merge pull request #392 from pypdfium2-team/font_helpers
  • 17c8412 Parametrize font helpers test
  • 51d0adf Add draft font helpers
  • a816bfe Update REUSE.toml, fix typo in pyproject.toml
  • da3b4f5 Make GN patch less invasive
  • 2e3d2ba Factor out cloning utility for cibw gn bootstrap
  • 4b4e344 cibw i686: try to improve GN bootstrap
  • fef5d24 Move patches
  • 9e0e53f cibw: fix manylinux_i686 target
  • 5bd0d31 Drop emulated musllinux_armv7l target
  • 0e74a4c cibw: retry armv7l with newer image
  • e5f2212 Comment out manylinux_armv7l again
  • bcad837 Yet another attempt at cibw/manylinux_armv7l
  • 0c7bde8 cibw/pyproject.toml nits
  • 4b6f2dc cibw/pyproject.toml: deduplicate symlinks (#389)
  • 8d6f6ad cibw: give up on manylinux_armv7l for now
  • 767e3a5 cibw: have another go at armv7l
  • f06a078 cibw: try to fix manylinux_{i68...
Read more

5.0.0

26 Oct 13:31

Choose a tag to compare

Changes (Release 5.0.0)

Summary (pypdfium2)

API changes

  • Rendering / Bitmap
    • Removed PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.
    • Removed PdfBitmap.get_info() and PdfBitmapInfo, which existed mainly on behalf of data transfer with PdfDocument.render(). Instead, take the info from the PdfBitmap object directly. (If using an adapter that copies, you may want to store the relevant info in variables to avoid holding a reference to the original buffer.)
    • PdfBitmap.fill_rect(): Changed argument order. The color parameter now goes first.
    • PdfBitmap.to_numpy(): If the bitmap is single-channel (grayscale), use a 2d shape to avoid needlessly wrapping each pixel value in a list.
    • PdfBitmap.from_pil(): Removed recopy parameter.
  • Pageobjects
    • Renamed PdfObject.get_pos() to .get_bounds().
    • Renamed PdfImage.get_size() to .get_px_size().
    • PdfImage.extract(): Removed fb_render option because it does not fit in this API. If the image's rendered bitmap is desired, use .get_bitmap(render=True) in the first place.
  • PdfDocument.get_toc(): Replaced PdfOutlineItem namedtuple with method-oriented wrapper classes PdfBookmark and PdfDest, so callers may retrieve only the properties they actually need. This is closer to pdfium's original API and exposes the underlying raw objects. Provides signed count as-is rather than splitting in n_kids and is_closed. Also distinguishes between dest is None and a dest with unknown mode.
  • Renamed misleading PdfMatrix.mirror() parameters v, h to invert_x, invert_y, as the terms horizontal/vertical flip commonly refer to the transformation applied, not the axis around which is being flipped (i.e. the previous v meant flipping around the Y axis, which is vertical, but the resulting transform is inverting the X coordinates and thus actually horizontal). No behavior change if you did not use keyword arguments.
  • PdfTextPage.get_text_range(): Removed implicit translation of default calls to .get_text_bounded(), as pdfium reverted FPDFText_GetText() to UCS-2, which resolves the allocation concern. However, callers are encouraged to explicitly use .get_text_bounded() for full Unicode support.
  • Removed legacy version flags V_PYPDFIUM2, V_LIBPDFIUM, V_BUILDNAME, V_PDFIUM_IS_V8, V_LIBPDFIUM_FULL in favor of PYPDFIUM_INFO, PDFIUM_INFO.

Improvements and new features

  • Added PdfPosConv and PdfBitmap.get_posconv(page) helper for bidirectional translation between page and bitmap coordinates.
  • Added PdfObject.get_quad_points() to get the corner points of an image or text object.
  • Exposed PdfPage.flatten() (previously semi-private _flatten()), after having found out how to correctly use it. Added check and updated docs accordingly.
  • With PdfImage.get_bitmap(render=True), added scale_to_original option (defaults to True) to temporarily scale the image to its native pixel size. This should improve output quality and make the API substantially more useful. Thanks to Lei Zhang for the suggestion.
  • Added context manager support to PdfDocument, so it can be used in a with-statement, because opening from a file path binds a file descriptor (usually on the C side), which should be released explicitly, given OS limits.
  • If document loading failed, err_code is now assigned to the PdfiumError instance so callers may programmatically handle the error subtype. This addresses {issue}308.
  • In PdfPage.render(), added a new option maybe_alpha to use a pixel format with alpha channel if page content has transparency, as rendering to a non-alpha bitmap is inefficient with PDFium in this case. Therefore, it is recommended to set this option to True if dynamic (page-dependent) pixel format selection is acceptable. Alternatively, you might want to use only BGRA via force_bitmap_format=pypdfium2.raw.FPDFBitmap_BGRA (at the cost of occupying more memory compared to BGR).
  • In PdfBitmap.new_*() methods, avoid use of .from_raw(), and instead call the constructor directly, as most parameters are already known on the caller side when creating a bitmap.
  • PdfPage.remove_obj() is now aware of objects nested in Form XObjects, and will use the new pdfium API FPDFFormObj_RemoveObject() in that case. Correspondingly, a .container attribute has been added to PdfObject, which points to the parent Form XObject, or None if the object is not nested.
  • In the rendering CLI, added --invert-lightness --exclude-images post-processing options to render with selective lightness inversion. This may be useful to achieve a "dark theme" for light PDFs while preserving different colors, but goes at the cost of performance. (PDFium also provides a color scheme option, but this only allows you to set colors for certain object types, which are then forced on all instances of the type in question. This may flatten different colors into one, leading to a loss of visual information.)
  • Corrected some null pointer checks: we have to use bool(ptr) rather than ptr is None.
  • In PdfDocument.save(), changed default of flags from FPDF_NO_INCREMENTAL to 0, as suggested by an upstream maintainer.
  • Avoid creation of sized pointer types at runtime, to not blow up an unbounded pointer type cache of ctypes, which could effectively lead to a memory leak in a long-running application (i.e. do (type * size).from_address(addressof(first_ptr.contents)) instead of cast(first_ptr, POINTER(type * size)).contents). Thanks to Richard Hundt for the bug report, {issue}346. The root issue (ctypes using an unbounded cache in the first place) has been fixed recently in Python 3.14. See below for a list of APIs that were affected:
    • Anything using _buffer_reader/_buffer_writer under the hood (PdfDocument created from byte stream input, PdfImage.load_jpeg(), PdfDocument.save()).
    • PdfBitmap.from_raw() rsp. PdfBitmap._get_buffer() and their internal callers (PdfBitmap makers new_foreign and new_foreign_simple, PdfImage.get_bitmap()).
    • Also, some Readme snippets were affected, including the raw API rendering example. The Readme has been updated to mention the problem and use .from_address(...) instead.
    • With older versions of pypdfium2/python, periodically calling ctypes._reset_cache() can work around this issue.
  • Improved startup performance by deferring imports of optional dependencies to the point where they are actually needed, to avoid overhead if you do not use them.
  • Simplified version classes (no API change expected).

Platforms

  • Experimental Android (PEP 738) and iOS (PEP 730) support added.
    Android arm64_v8a, armeabi_v7a, x86_64, x86 and iOS arm64 device and arm64, x86_64 simulators are now handled in setup and should implicitly download the right pdfium-binaries. Provided on a best effort basis, and largely untested. Testers/feedback welcome.
  • pypdfium2's setup is now also capable of producing wheels for these platforms, but they will not actually be included in releases at this time. (Once Termux ships Python 3.13, we may want to publish Android arm64_v8a and maybe armeabi_v7a wheels, but we do not intend to provide wheels for simulators.)
  • iOS will not actually work yet, as the PEP indicates binaries ought to be moved to a special Frameworks location for permission reasons, in which case you'd also have to patch pypdfium2's library search. We cannot do anything about this yet without access to a device or clearer instructions. Community help would be appreciated here.
  • Added draft cibuildwheel workflow and configuration, as a second footing for the project (based on the native sourcebuild, see below). In the future, this may allow to stuff some Linux architecture gaps the quick & dirty way with emulation, or maybe new native runners. Many thanks to wojiushixiaobai for providing the initial workflow and helpful pointers.

Setup

  • When pdfium binaries are downloaded implicitly on setup or emplace.py is run, we now pin the pdfium version by default. This is to prevent possible API breakage when pypdfium2 is installed from source. It should also make the git dependency optional on default setup. update.py and craft.py continue to default to the latest pdfium-binaries version.
  • pdfium-binaries now use GitHub's new "immutable releases" feature and offer GitHub build provenance attestations, for enhanced supply chain safety. Many thanks to Benoit Blanchon and GitHub team. Conversely, update.py now exposes a --verify option to mandate checking the attestation, which is enabled in our release workflow. Otherwise, verification will be automatically enabled if the gh dependency is installed.
  • We finally have a build script that works without Google's toolchain, and instead uses system tools/libraries (build_native.py). This has been inspired by the libpdfium COPR / libpdfium-nojs AUR recipes. Thanks to the respective packagers for showing how to do this. By default, this will use the GCC compiler, but Clang should also work if you set up some symlinks. As of this writing, both passes on our Ubuntu x84_64/arm64 CI.
  • On host platforms not covered with pdfium-binaries, setup now looks for system/libreoffice pdfium. If this is not available either, build_native.py will be triggered. This can also be requested explicitly by setting PDFIUM_PLATFORM to fallback, system-search or build-native.
  • Reworked setup to expose all targets through PDFIUM_PLATFORM. Added proper system staging directory. Refactored integration of caller-provided data files to avoid ambiguity. See the updated Readme for details.
  • The toolchained build script continues to be available as well, but has been renamed from sourcebuild.py to build_toolchained.py.
  • Both build scripts now pin pdfium to the version last tested by pypdfium2-team.
  • With `build_...
Read more

5.0.0b2

31 Jul 18:03

Choose a tag to compare

Changes (Release 5.0.0b2)

Summary (pypdfium2)

API changes

  • Rendering / Bitmap
    • Removed PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.
    • Removed PdfBitmap.get_info() and PdfBitmapInfo, which existed mainly on behalf of data transfer with PdfDocument.render(). Instead, take the info from the PdfBitmap object directly. (If using an adapter that copies, you may want to store the relevant info in variables to avoid holding a reference to the original buffer.)
    • PdfBitmap.fill_rect(): Changed argument order. The color parameter now goes first.
    • PdfBitmap.to_numpy(): If the bitmap is single-channel (grayscale), use a 2d shape to avoid needlessly wrapping each pixel value in a list.
    • PdfBitmap.from_pil(): Removed recopy parameter.
  • Pageobjects
    • Renamed PdfObject.get_pos() to .get_bounds().
    • Renamed PdfImage.get_size() to .get_px_size().
    • PdfImage.extract(): Removed fb_render option because it does not fit in this API. If the image's rendered bitmap is desired, use .get_bitmap(render=True) in the first place.
  • PdfDocument.get_toc(): Replaced PdfOutlineItem namedtuple with method-oriented wrapper classes PdfBookmark and PdfDest, so callers may retrieve only the properties they actually need. This is closer to pdfium's original API and exposes the underlying raw objects. Provides signed count as-is rather than splitting in n_kids and is_closed. Also distinguishes between dest is None and a dest with unknown mode.
  • Renamed misleading PdfMatrix.mirror() parameters v, h to invert_x, invert_y, as the terms horizontal/vertical flip commonly refer to the transformation applied, not the axis around which is being flipped (i.e. the previous v meant flipping around the Y axis, which is vertical, but the resulting transform is inverting the X coordinates and thus actually horizontal). No behavior change if you did not use keyword arguments.
  • PdfTextPage.get_text_range(): Removed implicit translation of default calls to .get_text_bounded(), as pdfium reverted FPDFText_GetText() to UCS-2, which resolves the allocation concern. However, callers are encouraged to explicitly use .get_text_bounded() for full Unicode support.
  • Removed legacy version flags V_PYPDFIUM2, V_LIBPDFIUM, V_BUILDNAME, V_PDFIUM_IS_V8, V_LIBPDFIUM_FULL in favor of PYPDFIUM_INFO, PDFIUM_INFO.

Improvements and new features

  • Added PdfPosConv and PdfBitmap.get_posconv(page) helper for bidirectional translation between page and bitmap coordinates.
  • Added PdfObject.get_quad_points() to get the corner points of an image or text object.
  • Exposed PdfPage.flatten() (previously semi-private _flatten()), after having found out how to correctly use it. Added check and updated docs accordingly.
  • With PdfImage.get_bitmap(render=True), added scale_to_original option (defaults to True) to temporarily scale the image to its native pixel size. This should improve output quality and make the API substantially more useful. Thanks to Lei Zhang for the suggestion.
  • Added context manager support to PdfDocument, so it can be used in a with-statement, because opening from a file path binds a file descriptor (usually on the C side), which should be released explicitly, given OS limits.
  • If document loading failed, err_code is now assigned to the PdfiumError instance so callers may programmatically handle the error subtype. This addresses {issue}308.
  • In PdfPage.render(), added a new option use_bgra_on_transparency. If there is page content with transparency, using BGR(x) may slow down PDFium. Therefore, it is recommended to set this option to True if dynamic (page-dependent) pixel format selection is acceptable. Alternatively, you might want to use only BGRA via force_bitmap_format=pypdfium2.raw.FPDFBitmap_BGRA (at the cost of occupying more memory compared to BGR).
  • In PdfBitmap.new_*() methods, avoid use of .from_raw(), and instead call the constructor directly, as most parameters are already known on the caller side when creating a bitmap.
  • PdfPage.remove_obj() is now aware of objects nested in Form XObjects, and will use the new pdfium API FPDFFormObj_RemoveObject() in that case. Correspondingly, a .container attribute has been added to PdfObject, which points to the parent Form XObject, or None if the object is not nested.
  • In the rendering CLI, added --invert-lightness --exclude-images post-processing options to render with selective lightness inversion. This may be useful to achieve a "dark theme" for light PDFs while preserving different colors, but goes at the cost of performance. (PDFium also provides a color scheme option, but this only allows you to set colors for certain object types, which are then forced on all instances of the type in question. This may flatten different colors into one, leading to a loss of visual information.)
  • Corrected some null pointer checks: we have to use bool(ptr) rather than ptr is None.
  • In PdfDocument.save(), changed default of flags from FPDF_NO_INCREMENTAL to 0, as suggested by an upstream maintainer.
  • Avoid creation of sized pointer types at runtime, to not blow up an unbounded pointer type cache of ctypes, which could effectively lead to a memory leak in a long-running application (i.e. do (type * size).from_address(addressof(first_ptr.contents)) instead of cast(first_ptr, POINTER(type * size)).contents). Thanks to Richard Hundt for the bug report, {issue}346. The root issue (ctypes using an unbounded cache in the first place) has been fixed recently in Python 3.14. See below for a list of APIs that were affected:
    • Anything using _buffer_reader/_buffer_writer under the hood (PdfDocument created from byte stream input, PdfImage.load_jpeg(), PdfDocument.save()).
    • PdfBitmap.from_raw() rsp. PdfBitmap._get_buffer() and their internal callers (PdfBitmap makers new_foreign and new_foreign_simple, PdfImage.get_bitmap()).
    • Also, some Readme snippets were affected, including the raw API rendering example. The Readme has been updated to mention the problem and use .from_address(...) instead.
    • With older versions of pypdfium2/python, periodically calling ctypes._reset_cache() can work around this issue.
  • Improved startup performance by deferring imports of optional dependencies to the point where they are actually needed, to avoid overhead if you do not use them.
  • Simplified version classes (no API change expected).

Platforms

  • Experimental Android (PEP 738) and iOS (PEP 730) support added.
    Android arm64_v8a, armeabi_v7a, x86_64, x86 and iOS arm64 device and arm64, x86_64 simulators are now handled in setup and should implicitly download the right pdfium-binaries. Provided on a best effort basis, and largely untested. Testers/feedback welcome.
  • pypdfium2's setup is now also capable of producing wheels for these platforms, but they will not actually be included in releases at this time. (Once Termux ships Python 3.13, we may want to publish Android arm64_v8a and maybe armeabi_v7a wheels, but we do not intend to provide wheels for simulators.)
  • iOS will not actually work yet, as the PEP indicates binaries ought to be moved to a special Frameworks location for permission reasons, in which case you'd also have to patch pypdfium2's library search. We cannot do anything about this yet without access to a device or clearer instructions. Community help would be appreciated here.

Setup

  • When pdfium binaries are downloaded implicitly on setup or emplace.py is run, we now pin the pdfium version by default. This is to prevent possible API breakage when pypdfium2 is installed from source. It should also make the git dependency optional on default setup. update.py and craft.py continue to default to the latest pdfium-binaries version.
  • update.py: added --verify option to confirm authenticity of pdfium-binaries release via SLSA provenance. Requires slsa-verifier. Thanks to Benoit Blanchon for the upstream part. Also thanks to ArcticLampyrid for the pointer.
  • We finally have a build script that works without Google's toolchain, and instead uses system tools/libraries (build_native.py). This has been inspired by the libpdfium COPR / libpdfium-nojs AUR recipes. Thanks to the respective packagers for showing how to do this. By default, this will use the GCC compiler, but Clang should also work if you set up some symlinks. As of this writing, both passes on our Ubuntu x84_64/arm64 CI.
  • On host platforms not covered with pdfium-binaries, setup now looks for system/libreoffice pdfium. If this is not available either, build_native.py will be triggered. This can also be requested explicitly by setting PDFIUM_PLATFORM to fallback, system-search or build-native.
  • Reworked setup to expose all targets through PDFIUM_PLATFORM. Added proper system staging directory. Refactored integration of caller-provided data files to avoid ambiguity. See the updated Readme for details.
  • The toolchained build script continues to be available as well, but has been renamed from sourcebuild.py to build_toolchained.py.
  • Both build scripts now pin pdfium to the version last tested by pypdfium2-team.
  • By default, the build scripts now generate separate DLLs for dependency libraries, but you may pass --single-lib to restore the previous behavior of bundling dependencies into a single pdfium DLL. Setup has been changed accordingly to collect libraries with globbing patterns.
  • With build_toolchained.py --update, avoid calling gclient revert and gclient sync, because this seems to sync twice, which is slow. Instead, call only gclient sync with -D --reset.
  • With pdfium-binaries, read the full version from the VERSION file embedded in the tarballs...
Read more

5.0.0b1

03 Feb 21:35

Choose a tag to compare

Changes (Release 5.0.0b1)

Summary (pypdfium2)

API changes

  • Rendering / Bitmap
    • Removed PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.
    • Removed PdfBitmap.get_info() and PdfBitmapInfo, which existed mainly on behalf of data transfer with PdfDocument.render(). Instead, take the info from the PdfBitmap object directly. (If using an adapter that copies, you may want to store the relevant info in variables to avoid holding a reference to the original buffer.)
    • PdfBitmap.fill_rect(): Changed argument order. The color parameter now goes first.
    • PdfBitmap.to_numpy(): If the bitmap is single-channel (grayscale), use a 2d shape to avoid needlessly wrapping each pixel value in a list.
    • PdfBitmap.from_pil(): Removed recopy parameter.
  • Pageobjects
    • Renamed PdfObject.get_pos() to .get_bounds().
    • Renamed PdfImage.get_size() to .get_px_size().
    • PdfImage.extract(): Removed fb_render option because it does not fit in this API. If the image's rendered bitmap is desired, use .get_bitmap(render=True) in the first place.
  • PdfDocument.get_toc(): Replaced PdfOutlineItem namedtuple with method-oriented wrapper classes PdfBookmark and PdfDest, so callers may retrieve only the properties they actually need. This is closer to pdfium's original API and exposes the underlying raw objects. Provides signed count as-is rather than splitting in n_kids and is_closed. Also distinguishes between dest is None and a dest with unknown mode.
  • Renamed misleading PdfMatrix.mirror() parameters v, h to invert_x, invert_y, as the terms horizontal/vertical flip commonly refer to the transformation applied, not the axis around which is being flipped (i.e. the previous v meant flipping around the Y axis, which is vertical, but the resulting transform is inverting the X coordinates and thus actually horizontal). No behavior change if you did not use keyword arguments.
  • get_text_range(): Removed implicit translation of default calls to get_text_bounded(), as pdfium reverted FPDFText_GetText() to UCS-2, which resolves the allocation concern. However, callers are encouraged to explicitly use get_text_bounded() for full Unicode support.
  • Removed legacy version flags.

Improvements and new features

  • Added PdfPosConv and PdfBitmap.get_posconv(page) helper for bidirectional translation between page and bitmap coordinates.
  • Added PdfObject.get_quad_points() to get the corner points of an image or text object.
  • Exposed PdfPage.flatten() (previously semi-private _flatten()), after having found out how to correctly use it. Added check and updated docs accordingly.
  • With PdfImage.get_bitmap(render=True), added scale_to_original option (defaults to True) to temporarily scale the image to its pixel size. Thanks to Lei Zhang for the suggestion.
  • Added context manager support to PdfDocument, so it can be used in a with-statement, because opening from a file path binds a file descriptor (usually on the C side), which should be released explicitly, given OS limits.
  • If document loading failed, err_code is now assigned to the PdfiumError instance so callers may programmatically handle the error subtype.
  • In PdfPage.render(), added a new option use_bgra_on_transparency. If there is page content with transparency, using BGR(x) may slow down PDFium. Therefore, it is recommended to set this option to True if dynamic (page-dependent) pixel format selection is acceptable. Alternatively, you might want to use only BGRA via force_bitmap_format=pypdfium2.raw.FPDFBitmap_BGRA (at the cost of occupying more memory compared to BGR).
  • In PdfBitmap.new_*() methods, avoid use of .from_raw(), and instead call the constructor directly, as most parameters are already known on the caller side when creating a bitmap.
  • In the rendering CLI, added --invert-lightness --exclude-images post-processing options to render with selective lightness inversion. This may be useful to achieve a "dark theme" for light PDFs while preserving different colors, but goes at the cost of performance. (PDFium also provides a color scheme option, but this only allows you to set colors for certain object types, which are then forced on all instances of the type in question. This may flatten different colors into one, leading to a loss of visual information.)
  • Corrected some null pointer checks: we have to use bool(ptr) rather than ptr is None.
  • Improved startup performance by deferring imports of optional dependencies to the point where they are actually needed, to avoid overhead if you do not use them.
  • Simplified version classes (no API change expected).

Platforms

  • Experimental Android support added (cf. PEP 738). arm64_v8a, armeabi_v7a, x86_64, x86 are now handled in setup and should implicitly download the right binaries. We do not publish any android wheels at this time (for one thing, PyPI/warehouse does not support them yet). However, we might want to package arm64_v8a (and maybe armeabi_v7a) wheels in the future. Note, android support is provided on a best effort basis, and largely untested (only arm64 Termux prior to PEP 738 has been tested on the author's phone). Please report success or failure.
  • Experimental iOS support added as well (cf. PEP 730). arm64 device and simulator, and x86_64 simulator are now handled and should implicitly download the right binaries. However, this is untested and may not be enough to get all the way through. In particular, the PEP hints that the binary needs to be moved to a Frameworks location, in which case you'd also need to change the library search path. No iOS wheels will be provided at this time. However, if there are testers and an actual demand, iOS arm64 wheels may be enabled in the future.
  • Note, we have no intent to package wheels for the simulators (android x86_64/x86, ios arm64_simu/x86_64), as they are only relevant to developers, and installing from source with implicit binary download should be roughly equialvent.

Setup

  • Avoid needlessly calling _get_libc_ver(). Instead, call it only on Linux. A negative side effect of calling this unconditionally is that, on non-Linux platforms, an empty string may be returned, in which case the musllinux handler would be reached, which uses non-public API and isn't meant to be called on other platforms (though it seems to have passed).
  • If packaging with PDFIUM_PLATFORM=sourcebuild, forward the platform tag determined by bdist_wheel's wrapper, rather than using the underlying sysconfig.get_platform() directly. This may provide more accurate results, e.g. on macOS.

Project

  • Made the runfile fail fast and propagate errors via bash -eu. This is actually quite important to avoid potentially continuing on a broken state in CI.
  • CI: Added Linux aarch64 (GH now provides free runners) and Python 3.13 to the test matrix.
  • Merged tests_old/ back into tests/.
  • Migrated from deprecated .reuse/dep5/.reuse/dep5-wheel to more visible REUSE.toml/REUSE-wheel.toml.
  • Docs: Improved logic when to include the unreleased version warning and upcoming changelog.
  • Bumped minimum pdfium requirement in conda recipe to >6635 (effectively >=6638), due to new errchecks that are not version-guarded.
  • Cleanly split out conda packaging into an own file, and confined it to the conda/ directory, to avoid polluting the main setup code.
pypdfium2 commit log

Commits between 4.30.1 and 5.0.0b1 (latest commit first):

PDFium commit log

Commits between 6899 and 6996 (latest commit first):

Read more

4.30.1

19 Dec 19:40

Choose a tag to compare

Changes (Release 4.30.1)

Summary (pypdfium2)

  • PdfPage.get_objects(): Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to.
  • Fixed another dotted filepath blunder in the extract-images CLI. (The PdfImage.extract() API is not affected this time.)
  • Adapted setup code to bdist_wheel relocation (moved from wheel to setuptools).
  • Fixed installation with reference bindings (PDFIUM_BINDINGS=reference) by actually including them in the sdist and adding a missing mkdir call. (In older versions, this can be worked around by cloning the repository and creating the missing directory manually before installation.)
  • Fixed sourcebuild on windows by syncing patches with pdfium-binaries.
  • Updated test expectations: due to changes in pdfium, some numbers are now slightly different.
  • Fixed conda packaging: It is now required to explicitly specify -c defaults with --override-channels, presumably due to an upstream change.
  • Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
  • Bumped workflows to Python 3.12.
  • Updated docs on licensing.
  • This is expected to be the last release of the v4 series.
pypdfium2 commit log

Commits between 4.30.0 and 4.30.1 (latest commit first):

  • b4e4105 [autorelease main] update 4.30.1
  • 08041a2 publish: disable attestations, tmp comment out
  • febe1a4 Changelog nits
  • 4fe6445 Q&D adaption to bdist_wheel relocation (fixes #326)
  • 067847a Fix reference bindings missing in sdist
  • 2ec6bd6 workflows: re-enable conda_raw trigger
  • 1320a3f sourcebuild: sync patches with pdfium-binaries
  • be173a7 changelog fixup
  • b85745a Update test expectations
  • 5001bf9 Prepare for possible release
  • 860bf97 Revert "Clarify Cannot close object; library is destroyed condition"
  • 6736a5d Update licensing docs
  • ce1faba Add missing mkdir with refbindings (fixes #320)
  • ff2ff4b Clarify Cannot close object; library is destroyed condition
  • 0f4bba8 PR template: use details summary rather than heading
  • 6bb675a chore: slightly update PR template
  • 7dca75c conda: also add -c defaults in workflow
  • f250b34 CLI/extract-images: Fix another dotted filepath blunder
  • 3fd35cf Fix conda packaging (upstream behavior change) (#314)
  • a07372d Update workflows to Python 3.12
  • d8a3128 versioning: swap minor/patch inc default, allow manual override
  • 38f5efe PdfPage.get_objects(): don't register objects as kids
  • 6f13da6 Slightly fix up changelog
PDFium commit log

Commits between 6462 and 6899 (latest commit first):

The pdfium commit log is omitted this time because it exceeded GH's character limit. See https://github.com/pypdfium2-team/pypdfium2/actions/runs/12419415378/job/34674787577: Error: Error 422: Validation Failed: {"resource":"Release","code":"custom","field":"body","message":"body is too long (maximum is 125000 characters)"}.
That's also why this GH release was created manually.

Update: added commit log as attachment (see below)

4.30.0

09 May 18:33

Choose a tag to compare

Changes (Release 4.30.0)

Summary (pypdfium2)

Backported bug fixes / corrections from current development branch to preferably leave v4 in a clean state.

  • Fixed blunder in PdfImage.extract() producing an incorrect output path for prefixes containing a dot. In the extract-images CLI, this caused all output images of a type to be written to the same path for a document containing a non-extension dot in the filename.
  • XFA / rendering CLI: Fixed incorrect recognition of document length. pdf.init_forms() must be called before len(pdf).
  • Made get_text_range() allocation adapt to pdfium version, as FPDFText_GetText() has been reverted to UCS-2. (See v4.28 changelog for background.)
  • Updated workflows to include both macos-13 and macos-14 in test matrices because v13 is Intel and v14 ARM64 on GH actions. Removed python 3.7 testing because not supported anymore on macos-14 runners.
pypdfium2 commit log

Commits between 4.29.0 and 4.30.0 (latest commit first):

  • 6bf53c4 [autorelease main] update 4.30.0
  • 1e9e100 Add changelog entry for workflows
  • 5ad40ab Test both macOS ARM64 and Intel in all workflows
  • 600d36c Try to fix main workflow (GH arch change in macOS-latest)
  • a057218 Add changelog for backports
  • 653c38c textpage: update docs
  • 2577f5b [BP] CLI/render: fix XFA document length recognition
  • eded6c2 get_text_range(): adapt allocation to pdfium version
  • 7ce4d31 PdfImage.extract(): fix for filenames containing non-extension dot
  • 5dc2eee issue templates: reorder commands
  • 493742d Make issue templates slightly nicer
  • 391575a Inhibit autorelease until v5 is merged
PDFium commit log

Commits between 6406 and 6462 (latest commit first):

  • 7b7c83fba Roll build/ bbc1efa4c..5eb3babb0 (147 commits)
  • 9783ba486 Fix one more edited PDF regression
  • 01ea79cec Update hooks for reclient
  • 95b1aabea Add one more pixel test for an edited PDF that regressed
  • aaf2cc937 Roll clang to pick up unsafe_buffer_paths.txt format changes.
  • 6abd9f147 Introduce fxcrt::try_spancpy() and fxcrt::try_spanmove().
  • 89d9beb11 Roll v8/ 7f0739496..0832ba514 (553 commits; 1 trivial rolls)
  • 3a2e1651f Roll buildtools and libc++
  • 2c9060d69 Roll third_party/abseil-cpp/ a64dd87ce..2c1ad970d (2 commits)
  • c07eb97fd Roll third_party/fp16/src/ 0a92994d7..581ac1c79 (1 commit)
  • 32fff0d8c Update gn_version to f284b6b47039a2d7edfcbfc51f52664f82b5a789
  • fa8edc249 Roll third_party/skia/ 7338f5521..04ee4daae (438 commits)
  • 4d6d703eb Roll third_party/freetype/src/ f42ce2556..1168b1b5b (15 commits)
  • 0a3a3ee5c Roll base/allocator/partition_allocator/ 8a9c3373f..3b0bd80fa (37 commits)
  • ad5237f89 Roll tools/rust/ eaff38a21..8fcf2bf39 (15 commits)
  • 95cb40c79 Roll third_party/libc++abi/src/ 1317096ef..51fe35844 (2 commits)
  • 2d1bd6c9a Update reclient_version to 0.138.0.e854224-gomaip
  • 8342a586d Use spancpy() in more places
  • 02ff1756c Fix yet another edited PDF that regressed
  • 7d687a0a3 Introduce {Byte,Wide}String::span_with_terminator().
  • 64447358e Mark fx_memcpy_wrappers.h functions UNSAFE_BUFFER_USAGE.
  • 7cf8895f6 Enable fuzzing with Skia enabled
  • 155028a48 Add yet another pixel test for an edited PDF that regressed
  • ff78e42df Roll Code Coverage from f459fdcdfc6c to 1b0ca9db1266 (3 revisions)
  • 926b395d8 Roll Depot Tools from 4a9d989f52e9 to 4246ba023a15 (107 revisions)
  • 0b4ff9a49 Roll libpng from 5140e80f1841 to 34954dfe60ef (2 revisions)
  • 863c78226 Roll Instrumented Libraries from 0172d67d98df to 682a735d9f5c (18 revisions)
  • 8b5bd138e Roll Catapult from 949df6114f3f to 5fbda23b3a86 (52 revisions)
  • 0be533aea Roll Memory Tools from c6d669e13804 to 2448d81f9741 (1 revision)
  • 97c93fd37 Roll abseil-cpp, buildtools, clang, and libc++
  • 1a5ec9fb4 Gate GDI APIs behind IsUser32AndGdi32Available in cpdf_interactiveform.cpp
  • fde20e170 Deduplicate code in CPDF_Parser and rename some methods
  • 763c169be Fix parsing of PDFs with multiple cross reference streams
  • bc759a2ae Add another pixel test for an edited PDF that regressed
  • 2c66e07e9 Spanify CFX_SeekableStreamProxy
  • d6a4b27d8 Spanify FPDFText_GetText() and FPDF_GetBoundedText().
  • 1a8053c08 Don't allow two-arg span constructor without UNSAFE_BUFFER() annotation.
  • 3f197528d Apply UNSAFE_BUFFERS() to two-arg span ctor in core/
  • f0dc864fb Put plugin-specific logic in pdfium_common_config.
  • 1eb7ddcf1 Apply UNSAFE_BUFFERS() to two-arg span ctor in xfa/
  • 590668ba7 Apply UNSAFE_BUFFERS() to two-arg span ctor in testing/
  • 3b679fe3f Apply UNSAFE_BUFFERS() to two-arg span ctor in fpdfsdk/
  • 317e40e19 Use new instrumented_libs repo
  • 0e4ff8cd8 Roll Zlib from c5bf1b566e5d to d076d8bd0898 (6 revisions)
  • [5a49e751e](https://pdfium.google...
Read more

4.29.0

10 Apr 04:21

Choose a tag to compare

Changes (Release 4.29.0)

Summary (pypdfium2)

pypdfium2 commit log

Commits between 4.28.0 and 4.29.0 (latest commit first):

  • 66cfaa0 [autorelease main] update 4.29.0
  • b1361a7 sourcebuild: generally opt out of PartitionAlloc
  • ec5b497 docs: improve python_api preface
  • a8d8c0a update refbindings (path stripping fix)
PDFium commit log

Commits between 6337 and 6406 (latest commit first):

  • b756612c7 Use the new v8 interceptor API
  • afc399ff5 Roll v8/ fe4ad3b98..f6f7c6822 (302 commits)
  • 6af6c6197 Fix unsafe pointer usage in CJX_HostPseudoModel
  • b9ebffc36 Fix typo in {Byte,Wide}StringView.TrimmedRight tests
  • 567dff87b Avoid unsafe indexing in EncodeURL()
  • 7ca0110e3 Use WriteFloat() inside WriteColorToStream()
  • f6df154e3 Fix some unsafe buffer usage in CPDF_Dest.
  • 6ddcbf24b Mark one remaining unsafe function in core/fpdfapi/edit.
  • 2855deed0 Do not write out /Page objects that are not in the page tree
  • e4cebef61 Roll tools/rust/ 1d0018c65..eaff38a21 (6 commits)
  • b870f6853 Roll third_party/skia/ 32f1cb507..7338f5521 (263 commits)
  • 93c8137d8 Roll base/allocator/partition_allocator/ c702699cc..8a9c3373f (30 commits)
  • e707409fc Roll third_party/libc++abi/src/ fc6253a64..1317096ef (2 commits)
  • 6123bc06a Roll third_party/libunwind/src/ fc505746f..419b03c0b (2 commits)
  • 77b0d2a1b Update reclient_version to 0.134.1.2c9285b-gomaip
  • 9dfab8917 Roll third_party/googletest/src/ e4fdb87e7..eff443c6e (7 commits)
  • bf35e1110 Roll third_party/freetype/src/ 2a790a9f4..f42ce2556 (4 commits)
  • 483e5e1f5 Change cfx_cmyk_to_srgb code to return struct FX_RGB
  • 0095eef10 Improve comments and naming in calculate_pitch.h
  • d43b6ce46 Update gn_version to 93ee9b91423c1f1f53fb5f6cba7b8eef6247a564
  • 8ba296abd Roll Depot Tools from fbb0301f1f70 to 4a9d989f52e9 (81 revisions)
  • 027aa4b67 Roll Code Coverage from 10ce382356ce to f459fdcdfc6c (9 revisions)
  • d7ec4201b Switch CPDF_MeshStream to use FX_RGB
  • ffbbea8d3 Add struct FX_RGB
  • 2238fbe1b Add fpdfsdk/{pwl,formfiller,fpdfxfa}/ directories to unsafe buffers.
  • e9b7be916 Make SBThemeData::clrBtnBK a one-dimensional array.
  • 008339888 Remove FXSYS_wcstof in favor of system wcstof().
  • e5458325d Add some FPDFDocEmbedderTests that delete pages and save
  • fb8abcb82 Enforce checking the return value of CFX_DIBitmap::Create()
  • 8111f8946 Put unsafe buffer configuration into PDFium
  • fe581ab87 Roll build/ e9a12f276..e5ff2eff3 (85 commits)
  • e58d4d723 Roll third_party/icu/ 1112fa6b3..d94ab131b (8 commits)
  • 278639036 Flag remaining unsafe buffer usage in fxcrt.
  • e21f71a90 Change CPDF_MeshStream::ReadColor() to return an array
  • 1f9ae706c Fix undefined behavior in DrawGouraud()
  • d9a020955 Fix some nits in DrawGouraud()
  • 1c2507320 Roll Catapult from 4dc7721a1444 to 949df6114f3f (83 revisions)
  • ec275ee3e Roll libpng from 3c7486b231c7 to 5140e80f1841 (1 revision)
  • c0800e8bd Remove Skia Sfntly dependency
  • 27062af25 Remove more wide string literals.
  • 7df165065 Remove some FXSYS_ functions in favor of std::char_traits<>.
  • 11b5f3bdb Simplify CFXJSE_NodeHelper::CreateNodeForCondition().
  • a9646b460 Fix regression in coverage_report.py
  • adc1b16a3 Set a default GN enable_safe_libstdcxx value
  • 2f6cef867 Avoid a compiler compatibility issue with CPDF_DefaultAppearance
  • e15b92e44 Convert some WideString::CompareNoCase() to EqualsASCIINoCase().
  • 71a0c1d89 Replace ptr/size pair with span in FXJSE_CLASS_DESCRIPTOR.
  • e8ef976cb Remove in-out parameter from GetFontFamily.
  • 11f9c8674 Enable UNOWNED_PTR_EXCLUSION checks for debug builds only.
  • b214b50e4 Adjust BUILD.gn files for path-based unsafe buffer warnings.
  • 2dc694121 Remove another parameter from CPDF_AnnotList methods
  • 7063716b1 Avoid calls to c_str() in cpdf_filespec.cpp.
  • c9f2bf183 Avoid duplicate checks in StringViewTemplate<>::Substr().
  • 70e774a94 Remove dead code in RenderPageImpl() callees
  • b039c387e Improve generated content stream data in cpdf_generateap.cpp
  • b119e4ac5 Make FPDFAnnotEmbedderTest.Bug1206 resiliant to changes
  • 1eac2c692 Remove use of string to hold binary data in cgdi_device_driver.cpp.
  • f93971a09 Move some fx_system.h replacements into a C++ only section.
  • [49089b8ad](https://pdfium.googlesource.com/pdfium/+/49089b8ad03587207e...
Read more