3.3.0
Changes (Release 3.3.0)
Summary (pypdfium2)
- Disruption:
PdfPage.insert_text()
does not generate page content automatically anymore. The newPdfPage.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'reNone
, 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 ofPdfDocument
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 toget_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 file16b5bb8
page: move comment to right place213ca63
workflow: re-activate schedule593f1b6
Remove commented-out close calls (#150)44f4aaa
Remove excessive commentsa0f79ef
Introduce get_text_bounded() right now7cf488f
Mainly documentation improvements464f6a7
textpage: make error handling caller-configurable0f9ca15
textpage.get_text(): check coords are within mediaboxdbc5419
Comment out excessive debug messages379b820
Merge development branch (#148)02b2e77
doc/render: add shortcut for single-page pdfsbe2770d
Improve docs forPdfDocument.get_page_size()
andPdfPage.get_size()
7ab2314
page: add notes regarding matrix renderingd4b6025
Improve matrix-related docs640aad0
Add matrix helper methods (#147)4e5a486
page.insert_object(): always set pageobj.pdfe2dc4f1
Update readme78c1102
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<> lifetimes756e1fe08
Use std::as_const() in a few places.411532e63
[Skia] Fix coons patch mesh renderinga88c2be5a
Encapsulate the CPDF_Page annots array.c42ec58fe
Encapsulate CPDF_StructElement::m_pDictd691ae619
Remove unused CPDF_InteractiveForm methods5680de5ef
Better encapsulate CPDF_InteractiveForm::m_pFormNotify.643278dc3
Add tools/resultdb to DEPS61f2c1da3
Make CPDF_FormField::GetFieldAttr() a non-static methodbf0f077f4
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_FlateEncoder05332a80d
Minimize vending pointers from CPDF_Action (single A)6938b0c12
Fix PDF annotation drawing order.a1428d380
Avoid vending dictionary pointers from CPDF_AActionbbf75918a
Add iterator stability comment to CPDFSDK_FormFIllEnvironment.191afc503
Convert compile-disabled Skia tests to runtime-disabled5c18b65d8
[xfa] Ignore invalid BMP pixel data offsetsc1b28b90c
[xfa] Fix image decoding across block boundaries80cfc5e86
Roll Code Coverage from 06c29fb95a45 to 690a8f131004 (4 revisions)48215d6b5
Roll Catapult from 7ee071132a53 to 16eb7278843e (57 revisions)