unstale

pypi / pypdfium2

pypdfium2

What changed in pypdfium2 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.

4 breaking1 deprecations9 new APIs and options8 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

pypdfium2 522 changes

Breaking changes 4

  • Module splitting through PYPDFIUM_MODULES={raw,helpers} is dropped; downstream packagers needing module splitting are advised to patch the project name and module include rules.

    5.14.0release notes

  • The project no longer provides its own conda packaging; the notes say pypdfium2 can instead be installed from PyPI in a conda environment.

    5.14.0release notes

  • The system-generate target is dropped.

    5.14.0release notes

  • Python versions below 3.8 are broken, so developers need Python 3.8 or newer.

    5.13.0release notes

Deprecations 1

  • Closing foreign bitmaps now warns that the operation may be unsafe because it frees the C-side buffer.

    5.14.0release notes

New APIs and options 9

  • Adds an API to read attachment descriptions.

    5.14.0release notes

  • Adds an API to obtain an attachment's MIME type.

    5.14.0release notes

  • Adds an API to write attachment descriptions.

    5.14.0release notes

  • Set warn_on_close to False to silence the warning when you have made sure closing a foreign bitmap is safe.

    5.14.0release notes

  • Adds an API to retrieve bookmark style.

    5.14.0release notes

  • Adds the PdfBookmarkStyle binding.

    5.14.0release notes

  • PDFium adds APIs to read and write attachment descriptions.

    5.13.0release notes

  • The public FormFill API exposes SetTextDirection, allowing integrations to set text direction.

    5.13.0release notes

  • Experimental Pyodide build support was added. Builds are flaky, may crash or freeze on shutdown, and are available for download from GitHub but not PyPI.

    5.13.0release notes

Fixes and other changes 8

  • For PdfDocument and PdfImage.load_jpeg(), a short readinto() now indicates an error when it reads fewer bytes than the buffer size.

    5.14.0release notes

  • Closing or finalizing a bitmap now always calls FPDFBitmap_Destroy(), including for bitmaps created from a native, pdfium-external buffer.

    5.14.0release notes

  • Fixes an off-by-one error that chopped one byte too much from the document identifier.

    5.14.0release notes

  • Windows spoof headers are now included in source distributions, preventing subtly incorrect bindings when installing from an sdist on Windows.

    5.13.0release notes

  • pdfium-binaries builds are now available for mipsle, expanding the architectures developers can use.

    5.13.0release notes

  • Runtime support and source installation compatibility with Python 3.6 and 3.7 were fixed; ctypesgen continues to require Python >=3.8.

    5.13.0release notes

  • PDFium partially fixes RTL character and line reading order in CPDF_TextPage, affecting text extraction from PDFs.

    5.13.0release notes

  • Fixes a missing mkdir call, particularly for the PDFIUM_PLATFORM=system-search / fallback setup.

    5.12.1release notes