Skip to content

3.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 Oct 10:16
· 568 commits to main since this release

Changes (Release 3.3.0)

Summary (pypdfium2)

  • Disruption: PdfPage.insert_text() does not generate page content automatically anymore. The new PdfPage.generate_content() method now needs to be called to apply changes, to avoid generating content repeatedly.
  • Disruption: In PdfTextPage.get_text(), the boundary values are now only set to defaults if they're None, not 0. This change was necessary because the underlying PDFium function requires PDF box values rather than normalised values.
  • pypdfium2 finally implements automatic object finalisation. Calling the close() methods is not mandatory anymore. The context manager API of PdfDocument is retained for backwards compatibility, but exiting the context manager does not close the document anymore, since this would increase the risk of closing objects in wrong order.
  • A new text extraction method get_text_range() was added. get_text() was renamed to get_text_bounded() but is still available as deprecated alias.
  • Text pages now have an n_chars attribute. count_chars() is still available as deprecated alias.
  • Added a helper class for transform matrices.
  • Added support models to capture pages as XObjects, to get page objects for XObjects, to transform them with matrices, and to insert page objects into a page. This may be used to implement a custom N-up compositor, for instance.
  • The document level renderer now uses a shortcut if processing just a single page.
  • When rendering, pypdfium2 now checks if the document has forms before initialising/exiting a form environment.
  • The Sphinx documentation now includes the Readme file.
pypdfium2 commit log

Commits between 3.2.0 and 3.3.0 (latest commit first):

  • ba76f9b [autorelease] update changelog and version file
  • 16b5bb8 page: move comment to right place
  • 213ca63 workflow: re-activate schedule
  • 593f1b6 Remove commented-out close calls (#150)
  • 44f4aaa Remove excessive comments
  • a0f79ef Introduce get_text_bounded() right now
  • 7cf488f Mainly documentation improvements
  • 464f6a7 textpage: make error handling caller-configurable
  • 0f9ca15 textpage.get_text(): check coords are within mediabox
  • dbc5419 Comment out excessive debug messages
  • 379b820 Merge development branch (#148)
  • 02b2e77 doc/render: add shortcut for single-page pdfs
  • be2770d Improve docs for PdfDocument.get_page_size() and PdfPage.get_size()
  • 7ab2314 page: add notes regarding matrix rendering
  • d4b6025 Improve matrix-related docs
  • 640aad0 Add matrix helper methods (#147)
  • 4e5a486 page.insert_object(): always set pageobj.pdf
  • e2dc4f1 Update readme
  • 78c1102 Add helpers for XObjects (#145)
PDFium commit log

Commits between 5337 and 5351 (latest commit first):

  • fe212103e Return retained object from CPDF_FormControl::GetWidgetDict()
  • 14b3b8cee Introduce CPDF_Dest::GetScrollPositionsArray().
  • 4ede0790c Return retained references from CPDF_PageObjectHolder methods.
  • 57595d4af Remove CPDF_StreamAcc::GetDict().
  • cfa4d05c9 Add death test for bad pdfium::span<> lifetimes
  • 756e1fe08 Use std::as_const() in a few places.
  • 411532e63 [Skia] Fix coons patch mesh rendering
  • a88c2be5a Encapsulate the CPDF_Page annots array.
  • c42ec58fe Encapsulate CPDF_StructElement::m_pDict
  • d691ae619 Remove unused CPDF_InteractiveForm methods
  • 5680de5ef Better encapsulate CPDF_InteractiveForm::m_pFormNotify.
  • 643278dc3 Add tools/resultdb to DEPS
  • 61f2c1da3 Make CPDF_FormField::GetFieldAttr() a non-static method
  • bf0f077f4 Avoid vending dictionary pointers from CPDF_StructElement.
  • ad9ec040e Delete unused CPDFSDK_AnnotReverseIteration.
  • 8176850eb Remove duplicate CPDF_FormField::GetDict() method.
  • b0d3d7ab9 Stop vending dictionary pointers from CPDF_FlateEncoder
  • 05332a80d Minimize vending pointers from CPDF_Action (single A)
  • 6938b0c12 Fix PDF annotation drawing order.
  • a1428d380 Avoid vending dictionary pointers from CPDF_AAction
  • bbf75918a Add iterator stability comment to CPDFSDK_FormFIllEnvironment.
  • 191afc503 Convert compile-disabled Skia tests to runtime-disabled
  • 5c18b65d8 [xfa] Ignore invalid BMP pixel data offsets
  • c1b28b90c [xfa] Fix image decoding across block boundaries
  • 80cfc5e86 Roll Code Coverage from 06c29fb95a45 to 690a8f131004 (4 revisions)
  • 48215d6b5 Roll Catapult from 7ee071132a53 to 16eb7278843e (57 revisions)