Releases: pypdfium2-team/pypdfium2
3.8.0
Changes (Release 3.8.0)
Summary (pypdfium2)
- Major improvements to GitHub Workflows.
- Fixed setup on macOS with Python 3.11. (Wheel users were not impacted.)
- Fixed build script on macOS (GN configuration).
- Fixed build script on Windows (patches and RC).
- Fixed test suite on Windows (cleanup failure).
- Fixed test suite on Python < 3.7.
PDFium commit log
Commits between 5406
and 5418
(latest commit first):
a98c08922
Ensure checkout_skia is defined before use4948d0e50
Only GN check //skia if checkout_skia=Truef8cf2e34d
Add ARM64 expectations for pdfium embedder testsf0e239249
Change CBC_OneDimWriter::AppendPattern() to use spans.d7fe73817
Better span arithmetic in CPDF_Image::SetImage()496ff1161
Prepare CBC_OneDimWriter::AppendPattern() for span conversion.055a8a210
Clean up CBC_OnedCode39Writer.65cbd7d93
Return vector from CPDF_Stream::ReadRawData()06943a994
Use more spans in streams, part 51852aa019
Include more Skia files in GN checks1d94eaddb
[Skia] Remove bug_880920.pdf from the suppression listc2ab68313
Suppress GN check issues with Skia includes in fpdf_view*.cpp.1ed2d0bd9
Change CBC_OneDimWriter::Encode() to return DataVector.dc2219869
Change CBC_OneDimWriter::RenderResult() to use a span.898c5e841
Remove dead code in CBC_OneDimWriter::RenderResult().4fbd4ab67
[Skia] Fix the issue that unwanted black borders are rendered.b5de5e89e
Get rid of a multiplier in the 1D barcode implementation.5c042e4aa
Allow spans to flow further down into CFX_DIBBase.8ebc9515f
Use more spans in streams, part 4.1f8d66db1
Convert CFX_BitStream to store a span<>ff0c8aa86
Remove needless multiplication by 1 in CPDF_Image::SetImage()868d94c69
Pass spans further down into jpx/jbig2 decoders52696f63d
Return span<> from CFX_DIBBase::GetBuffer().477cbda97
Improve SkPictureRecorder ownership91e0c3f14
Use bounds-checked spancpy() in cpdf_rendershading.cppe05af4345
Reduce layers of wrapper functions in CBC_OneDimWriter::Encode().f673e82fd
Remove height out-parameter from 1D barcode encoding methods.818c4cd3c
Run GN check on third_party/icu.a42db2e05
Use spancpy() in a few more places.6472a498b
Pass spans to ProgressiveDecoder::GifReadScanline().ed2828ff7
Replace sprintf calls with snprintf in third_party6a1250879
Use retained locals in CPDF_FormField804fd9ee2
Fix typos in FPDFAnnotEmbedderTest.InkAnnotation3d4231cfb
Roll Instrumented Libraries from 673b76772c2e to a8992bf8abb3 (10 revisions)
3.7.0
Changes (Release 3.7.0)
Summary (pypdfium2)
pypdfium2 commit log
Commits between 3.6.0
and 3.7.0
(latest commit first):
e220e13
[autorelease] update changelog and version file039d3a3
Add additional testing workflows632ff95
GH pages: nevermind, build on push to maincaf99d3
GH Pages: Daily build at 11 o'clock UTC734bec3
Add workflow for GH Pages31b7ad2
Blacklist broken wheel release95b4a04
workflow: address set-output deprecation
PDFium commit log
Commits between 5392
and 5406
(latest commit first):
7b8416e79
Add NOLINTNEXTLINE missed in prior CL.490d68130
Add NOLINTNEXTLINE() to public methods with murky ownership.8df158b30
Roll third_party/abseil-cpp/ 751b72a8c..384efd2e8 (11 commits)a85fe5432
Roll build/ 371b6c310..53351eb16 (37 commits)15255e1a4
Move-assign object in cpdf_object_walker_unittest.cpp010d211f3
Use retained locals in cpdf_pagecontentgenerator_unittest.cppaf616af06
Use retained local in CPDF_StructTree::LoadPageTree()5b5987975
Remove RetainedTreeNode.9f138e5d1
Restructure CPDF_Object methods to avoid analyzer warnings4da347bd4
Remove RetainPtr::operator=(T*)d89d2e00f
Use retained locals to avoid implicit .Get() calls20390f831
Turn off PartitionAlloc when building with GCC as well.d3d2ad3d2
Take small suggestions from clang-analyzer run over fpdfapi/3e08c2abb
Avoid fatal OOM in CStretchEngine::StartStretchHorz().5fdfb25eb
Use more spans in CStretchEngine.d6f9fe053
Fix some nits in fx_memory code.6c5cfd873
Use FixedTryAllocZeroedDataVector in CPDF_ContentParser.e5aa62574
Implement FixedTryAllocZeroedDataVector.e5bd69272
Actually fix clang-tidy report257a3d763
Change CPDF_SyntaxParser::ReadBlock() to take a span.204d96e1b
Re-enable OOM test cases.e1c2bcf6c
Use more spans in streams, part 3.b33a5a61d
Build SkOpts_crc32 on ARM648636cff40
Fix copyright headers in GN files5c00919b2
Speculative change for clang-analyzer.1f8663684
Use more spans in streams, part 2.b81de425a
Remove const-ref retained stream arguments, step 3.b9898333d
Fuzz the new CJPX_Decoder::Create() parameter.6a39df1f7
Use more spans in fxcrt streams.9b46097ae
[Skia] Remove some corpus tests from the suppression listcb1aee119
Add DCHECK() for non-zero sized spans with null data members.fb3d15edc
Roll tools/memory/ 98140a694..8581381d9 (2 commits)b3cb989f7
Roll buildtools/third_party/libunwind/trunk/ 7ff728a97..aabcd8753 (8 commits)7d89cb013
Roll buildtools/third_party/libc++abi/trunk/ 5c3e02e92..8dd405113 (10 commits)75f0ff464
Remove const-ref retained stream arguments, step 2.06d220f2b
Add stronger checks in span_util.h732e38a17
Remove const-ref retained stream arguments, step 1c323bf9ba
Disable LargeImageDoesNotRenderBlank test case in debug builds.027326013
Add a test case for rendering a large image.832a694e5
Update old-style copyright headersf01a27d2b
Fix non-compliant copyright headers5e33cbd12
Enable pan-project checks8d2f700af
Improve integer overflow checking in CStretchEngine::StartStretchHorz().ab6c904a2
Update gn_version to git_revision:11dc0b1f438bd26380774e9d50fd4c63f346d41add7089fa8
Roll Catapult from 16eb7278843e to 3a19f7afaa58 (59 revisions)59f26709f
Roll MarkupSafe from 1b882ef6372b to 13f4e8c9e206 (1 revision)9cab1a6e7
Roll Code Coverage from 690a8f131004 to 5afe9c957e79 (1 revision)be6fac607
Roll Jinja2 from ee69aa00ee85 to 4633bf431193 (1 revision)bdbf62394
Roll third_party/nasm/ 9215e8e1d..fc8e0bd89 (3 commits)
3.6.0
Changes (Release 3.6.0)
Summary (pypdfium2)
pypdfium2 commit log
Commits between 3.5.0
and 3.6.0
(latest commit first):
81638c9
[autorelease] update changelog and version file
PDFium commit log
Commits between 5378
and 5392
(latest commit first):
16812d6c1
Return object number from CPDF_IndirectObjectHolder::AddIndirectObject()5b59f6d89
Add FPDFText_HasUnicodeMapError() API.b899fba4e
Fix one unretained dictionary usage in CPDF_DIB03571c10b
Delete shebangs from some skia_gold scripts.7faffd69b
Remove "from future" Python imports.b915e047f
Change safetynet scripts to run with python3.231e7e159
Optimization of decoding large JPX images82cad2c70
Update comments about ownership in cpdf_indirect_object_holder.hb76ba9742
[Skia] Fix the black borders of small imagesf84a8a581
Roll third_party/depot_tools/ e3ed6a8e0..6f2321d1d (55 commits; 23 trivial rolls)8dda52ced
Roll Fuchsia SDK from version:9.20220929.2.1 to version:10.20221027.2.16f144ed06
Remove remaining UnownedPtr<>::Get() calls from core/8f819ac22
Roll base/allocator/partition_allocator/ bb627f4ab..cb1f2e8e0 (48 commits)bb9bf7d99
Remove explicit UnownedPtr<>::Get() calls from core/fpdf*/c4acde581
Remove explicit UnownedPtr<>::Get() calls from fpdfsdk/654d3591d
Remove explicit UnownedPtr<>::Get() calls from fxjs/b4d26b104
Remove explicit UnownedPtr<>::Get() calls from fxbarcode/0c3768e5d
Remove explicit UnownedPtr<>::Get() calls from xfa/5cc1afc13
Pass retained argument to ReplaceAbbr()5ade14bea
Return retained objects from CPDF_FormField methods.245050a61
Report more detail to ResultDB for pixel testsddc99ced8
Add test for CFFL_ComboBox::SetActionData()dab891757
Roll third_party/zlib/ 6fe4ce825..cff720848 (3 commits)4eda5e1f5
Roll third_party/icu/ 20f8ac695..35132cceb (2 commits)cc90b0cd9
Hide CPDF_FormField from CFFL_ComboBox59445b0a8
Roll tools/clang/ a5e0d7234..38497dbb2 (21 commits)2aa86baac
[Skia] Fix issue that a dot annotation is not rendered1f7ef7c1d
Remove some CPDF_Dictionary* locals.7c96f4765
Remove CPDF_Creator::m_pMetaData.2bd16e8c9
Make CFFL_ComboBox embedder test use higher-level methods.0df0082af
Add embedder test for FFL_ComboBox::GetSelectExportText()ec350d928
Create CFFL layer embedder test.cb6e71594
Remove CPDF_FormField::GetForm()a5bd2fa0f
Hide CPDF_FormControl from CFFL_Button1f8e56793
Rename CPWLComboBoxEditEmbedderTest::GetCFFLFormFiller()c44513e09
Make CPDF_PageView::GetInteractiveForm() a private method.9fe8223f0
Forward declare CPDF_ImageLoder in cpdf_imagerenderer.h8482a83de
Replace CPDF_Page::SetImageCache() with AddImageCache()98204b688
Move pixel test-only code to TestPixel()61a662172
Make CFX_RenderDevice::GetDeviceDriver() a protected methodb6c3a4de2
Revert "[Skia] Fix issue that a dot annotation is not rendered"22396a1ac
[Skia] Fix issue that a dot annotation is not rendered7ae9c064b
Roll third_party/skia/ 3050ef5ea..648827391 (287 commits)371f0b063
Remove const form of CPDF_RenderContext::Layer::GetObjectHolder()31fe0722b
Add Skia expectation for an AGG-only line drawing issue.927f85782
Roll third_party/skia/ ebfa2b71b..3050ef5ea (18 commits)3bd5f342d
Move CPDF_ImageLoader to page/ layer.2c9b918c2
Roll third_party/skia/ 03cb8e7d8..ebfa2b71b (4 commits)68fdc4913
Remove render layer concepts from CPDF_ImageLoader.
3.5.0
Changes (Release 3.5.0)
Summary (pypdfium2)
- Fixed an issue with the
__new__
method ofPdfPageObject
that caused__init__
to run twice. - Fixed faulty examples in the Readme.
pypdfium2 commit log
PDFium commit log
Commits between 5364
and 5378
(latest commit first):
16a4de2bb
Report test_runner.py test case output to ResultDB8841d123a
Shorten CPDF_PageImageCache::ImageCacheEntry to Entry57a6f3d3d
Remove CPDF_Page::RenderCacheIface167a560c7
Move CPDF_PageImageCache to page/ layer.b96600ee9
Rename CPDF_PageRenderCache to CPDF_PageImageCache.c988eee72
Remove render-layer concepts from CPDF_PageRenderCache.bce5eb53f
Processing the NoRotate flag when displaying annotations152084631
De-duplicate document pointers in CPDF_PageRenderCache::ImageCacheEntry74faf2c3b
Add experimental FPDFText_IsGenerated() API.607b84ebd
Roll v8/ f666aea4d..7ff976805 (323 commits)4e52af07a
Mark CPDF_Page::m_pPDFDocument as constdeba3a79b
Update PartitionAlloc commentf0f61c87d
Remove CPDF_StreamAcc::GetData().a46ea9b04
Remove CPDF_Stream's span ctor.6dc8a147d
Remove CPDF_Stream ctor that takes a std::unique_ptr.5e5c2bd24
Limited build support for iOS.b9a3dd089
Roll third_party/freetype/src/ 905270925..0b62c1e43 (18 commits)5ea4ecf11
Add a pixel test for annotations with the NoRotate flag.dab79f117
Remove data parameter from CPDF_Stream::InitStream() and rename.a3c920fb3
Replace some CPDF_Stream std::unique_ptr ctor usage.235e56abd
Change CPDF_Stream to store memory-based data in a DataVector.d61dac0d9
Use Google-style naming for CPDF_Stream member variables.9ab44983c
Change CPDF_Stream to use absl::variant.11d077ffc
Run Skia Gold as part of each pixel test784cc119a
Avoid another use of CPDF_Document::GetPageData().91d13f4aa
Reduce use of CPDF_Document::GetPageData()07d4ab7ec
Change CPDF_Stream::GetInMemoryRawData() to return a span.9b0ee1fb2
Disentangle CPDF_ContentParser from CPDF_Form.baa3f372f
Make CPDF_Pattern::document() a protected method.7e9f3de25
Use indirect object holder superclass in CPDF_PageContentManager.fb6dbcd0b
Realize objects created with FPDF_NewFormObjectFromXObject().d07ce743f
Returned retained result from CXFA_TextParser::GetParentStyle().47abf3795
Roll v8/ 261f00697..f666aea4d (42 commits)60a072f74
Report test duration to ResultDB56c4682ae
Don't pickle TestRunner2a09fff07
Separate test_runner.py's per-process stated08ac75a8
Also check FPDFPageObj_GetBounds() in ImportPageToXObject test.ee31732f6
Avoid exposing CFFL_InteractiveFormFiller::CallbackIface to callers.821be7591
Remove CPDF_RenderOptions::GetOCContext().b50fad7d0
Make CPWL_Wnd::GetParent() a protected method.cb75a6ce4
Remove CXFA_FFNotify::GetWidgetHandler().61a96c1db
Revert "Disable ResultDB for test_runner.py on Windows"f0a2d55c9
Roll build/ 01569374d..371b6c310 (103 commits)44528e4e1
Remove stray cppgc::Member<>::Get() calls0351b27f9
Convert CFXJSE_FormCalcContext::m_pDocument to WeakPersistent<>.756333545
Remove CFXJSE_ResolveProcessor::GetNodeHelper().aad1a8481
Remove CPDF_Annot::GetPopupAnnot()4adc95560
Enable 2 CFWLEditEmbedderTests
3.4.0
Changes (Release 3.4.0)
Summary (pypdfium2)
- Added a new support model
PdfImageObject
(which inherits fromPdfPageObject
). This can be used to insert a JPEG image into a page, get metadata, etc. - Docs: The changelog page now selectively includes an entry for the next release that may be shown on
latest
builds.
pypdfium2 commit log
Commits between 3.3.0
and 3.4.0
(latest commit first):
75a3854
[autorelease] update changelog and version file1c6bde4
Improve insert_jpeg() API9998d5a
Revert "RemovePdfDocument._rendering_input
and related features"d92ba57
misc: replace private methode7fad89
Move colour validationb175e3c
readme: add jpeg insertion examplee10f083
jpegtopdf: enhance comment7c34f76
pageobjects: add initial image support model (#151)a631a1a
docs/matrix: remove trivial information18017dc
docs: group C wrappers and pure-python helpersab934e4
Use a smarter way to keep data in memoryc1b0261
Inline utility methods613f10f
document: make assignment order nicer90a6c38
Smarter inclusion of changelog_staginga829800
docs: include changelog_staging depending on branch7aaa2e8
setup_base: nvm, use previous ext_modules approach549e02f
Inline opener into documentbfbaf0f
Clean up unused importsa2d0762
Make file access utilities publiccc0c2b6
opener: make get_fileaccess() a standalone function950db18
Slightly improve docs for static attributes5991e8b
setup: don't pin ctypesgen anymorebfd4e53
setup: thisif
should have been anelif
f1f510c
RemovePdfDocument._rendering_input
and related features
PDFium commit log
Commits between 5351
and 5364
(latest commit first):
336fae19c
Remove unused method CPDFSDK_Widget::GetInteractiveForm()fdbd4bb76
Use fxcrt::MakeFakeUniquePtr() in a few more places.3deb8857c
Disable ResultDB for test_runner.py on Windowsbc05517b5
Remove CXFA_FFDoc::GetPDFFontMgr()52370c146
Make CPDF_PageObjectHolder::RemovePageObject() clearerd1aaef4aa
Replace tuples with dataclasses in test_runner.py89acf61db
Use pdfium::Contains() to check CPDF_Form membership.72312d25b
Add CFXFontMapperSystemFontInfoTest.85c3cc8c7
[Skia] Remove path_9.pdf from the suppression listdf597389f
Remove .vpython.0e1f9b468
Replace CFX_Font::SetSubData() with AllocSubData().b214cdcb3
Wrap CFXJSE_Engine::GetJseContext() with GetJseContextForTest().146766408
Avoid returning unowned reference from CPDF_PSOP::GetProc()20ab33b4a
Simplify test case dispatch in test_runner.py3c5b5abbb
Remove CPDF_Parser::GetSyntax()8bad4d5fd
Remove 2 corpus tests from the suppression list9d2c662f5
Fix CHECK failures with GetFontData() calls.318ad8501
Rename CPDF_DataAvail::GetHintTables() to GetHintTablesForTest()30814aedc
De-virtualize CPDFXFA_Context::GetPDFDoc().9ab5ed692
Make CPDF_ColorState::SetPattern() less confusing.2f7efe5d8
Pass retained args and arrays as rvalues to color.a997e9b48
Add ResultDB support to test_runner.py029e389ef
Mark GetDocument() protected in CPDF_Document::PageDataIface.820c7b418
Mark pdfium::span<> as TRIVIAL_ABI and GSL_POINTER755476171
EncapsulateCFX_SubstFont::m_bFlagMM
.6a29d9e55
Add GSL_POINTER and TRIVIAL_ABI to compiler_specific.hef47a11d4
Remove CPDF_Annot::GetDocument()7516d8827
Remove CPDF_InteractiveForm::GetDocument().f369dce2e
Consolidate Python code to locate PDFium root529184818
Return retained reference from CPDF_Font::GetFontDict()9e4521d1f
Fix overlapping annot rendering with focused annot.95b363233
Fix CPDF_DocPageData::MaybePurgeFontFileStreamAcc()67a546fe6
Introduce CPDF_StreamAcc::KeyForCache()560d03e25
Roll Instrumented Libraries from e09c4b66b6e8 to 673b76772c2e (1 revision)
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)
3.2.0
Changes (Release 3.2.0)
Summary (pypdfium2)
pypdfium2 commit log
Commits between 3.1.0
and 3.2.0
(latest commit first):
b3ba56c
[autorelease] update changelog and version file16c0169
autorelease: improve versioning logicf37a0cf
packaging_base: add note73b4d87
packaging_base: add FIXMEa045696
setup.py: improve error messages for invalid statesfbeb84d
setup_base: add further exists() checks4cfa51c
craft_wheels: address FIXME4e8464f
craft_wheels: add a FIXME related to the artefact stash6830de0
build: replace dynamic values inresources.rc
bcea29c
readme updated1ae5cb
Update tasks15796bf
render_base(): remove allocator note67c8647
workflow: re-enable scheduleb3d6702
docs/python_api: fix missing word58a9d2f
code comment: fix missing words
PDFium commit log
Commits between 5323
and 5337
(latest commit first):
cfc766988
Remove unused method CPDF_Link::GetDict()986e12acf
Avoid vending pointers to CPDF_ColorSpace::m_pArray4df3e6b4f
Support runtime renderer selection in FPDFProgressiveRenderEmbedderTest61eb8063f
Roll third_party/skia/ 73fb58ce0..03cb8e7d8 (492 commits; 1 trivial rolls)79a701c67
Roll buildtools/ d66231001..cccaf48c8 (17 commits)3061eb8e9
Roll Fuchsia SDK from 9.20220830.0.1 to 9.20220929.2.1807603890
Roll third_party/icu/ bbdc7d893..20f8ac695 (1 commit)a37c9f0c9
Roll third_party/depot_tools/ 3528d4d3c..e3ed6a8e0 (45 commits; 13 trivial rolls)d442cee2b
Roll tools/clang/ 0a2285903..a5e0d7234 (23 commits)2fd6393c6
Roll third_party/zlib/ 926ac230d..6fe4ce825 (10 commits)60b3a0116
Roll tools/memory/ e5f1a8a76..98140a694 (1 commit)5945cf536
Update gn_version to cc28efe62ef0c2fb32455f414a29c4a55bb7fbc4ae04146f0
Roll v8/ 340416187..261f00697 (180 commits)73c5b8d68
Roll third_party/libjpeg_turbo/ 22f1a22c9..ed683925e (1 commit)1c35dd500
Roll base/trace_event/common/ 640fc6dc8..521ac34eb (3 commits)1a0312c74
Roll buildtools/third_party/libc++abi/trunk/ 48afced8a..5c3e02e92 (2 commits)8cb439419
Roll buildtools/third_party/libunwind/trunk/ 42aa6de55..7ff728a97 (3 commits)310c450c2
Only validate indexes for paletted BMPs144d4729b
Add basic unit tests for BMP decodingb4a309d9d
Fix initial BMP pixel offset2e5da1ba9
Roll third_party/freetype/src/ 8e68439a6..905270925 (10 commits)0969211eb
Enable FPDFEditEmbedderTest.SaveAndRender for Skia9fe159009
Return retained result from GetShadingObject()e282b0fab
Pass retained arguments to still more ctors/setters.14e8a0128
Fix roll-freetype.sh to work with sed on macOS5850f38fb
Roll build/ 06b221966..01569374d (154 commits)da5d81449
Roll base/allocator/partition_allocator/ d47a38e4a..bb627f4ab (24 commits)5e8077158
Roll third_party/lss/ 0d6435b73..ce877209e (8 commits)b01b2cdd1
Pass retained arguments to fpdfdoc/ class constructors.f504a7655
Fix retained argument TODOs, part 8.e1d691d54
Fix retained argument TODOs, part 7.7870d8d06
Fix retained argument TODOs, part 6.c90fa00b4
Enable FPDFEditEmbedderTest.GetRenderedBitmapHandlesSetMatrix for Skia6d8dfa196
Remove image_8bit_devicergb_dctdecode.pdf from the suppression list6723234d3
Return retained object from CPDF_Form and CPDF_GeneralState methods.4ab13cbdb
Document test runner positional arguments525a4270b
Fix retained argument TODOs, part 5.0fbd8fc96
Use retained references in fpdfsdk/fpdf_*.cpp filesc62c31ef1
Fix retained argument TODOs, part 4.cda6ca689
Fix retained argument TODOs, part 3.cd3d3798c
Rework CPDFSDK_FormFillEnvironment::JS_appResponse() callers.bb040742c
Return retained objects frm CPDF_Image methods5a3f1d31e
Fix retained argument TODOs, part 2.06749a7a5
Pass/return retained args from CPDF_NumberTree.3df809cbc
Fix retained argument TODOs, part 1.e08aa1ef0
Pass retained arguments to CPDF_PageObjectHolder.f9491f39e
Fix unowned/retain ptr conversion and assignment.af0fcf1ed
Pass retained arguments to CPDF_Action constructor- [
82b558c70
](https://pdfium.googl...
3.1.0
Changes (Release 3.1.0)
Summary (pypdfium2)
render_to()
was fixed to actually allow callables. The code passage in question was unreachable due to an unguardedissubclass()
check before.
pypdfium2 commit log
Commits between 3.0.0
and 3.1.0
(latest commit first):
b6e8e6d
[autorelease] update changelog and version file9117f42
Noneify.raw
attributes on close23b2b77
Update changelog_stagingf59dc65
Revert automatic closing via delb37b326
page.render_to: fix compatibility with callables7d3e7ee
converter: correct a docstring662f12b
setupsrc: slightly enhanceset_version()
7ec0744
setup.cfg: reset sphinx to normal2f3680b
workflow: comment out schedule againfc5bcd2
document: remove note on closing47d5c78
closing: check self before parentsfb62c5a
setup.cfg: temporarily block sphinx 5.2.0.post0b068b9e
Automatically close objects via__del__
(#142)69b3e9b
autorelease: log beta releases, without manual summaryf22d6f7
changelog: fix up autorelease note on pdfium version
PDFium commit log
Commits between 5316
and 5323
(latest commit first):
014c24029
Revert "Remove ALLOW_UNUSED macros."2785e0210
Pass retained array to CPDF_Dest constructor.953ff0e12
Merge FixedUninitDataVector and FixedZeroedDataVector code.38c2dcc58
Make UnownedPtr and RetainPtr more similar to each other.99762aa82
Re-order RetainPtr/UnownedPtr operator=() methods42fc37599
Replace CFX_MemoryStream::GetBuffer() with GetSpan().d1f85fdbb
Avoid ambiguity in CPDF_{Dictionary,Array}Locker constructors11a2745cd
Return retained result from CPDF_Dictionary::GetPageDictionary()5b0176124
Switch from DataVector to FixedDataVector CPDF_CMap.0820b6b7a
Use FixedDataVector in fxbarcode/ when applicable.7043b271f
Add a FixedZeroedDataVector container.0dc2e884d
Do more input checks inside BC_DefaultPlacement.cpp.065698acf
Fix interaction between RetainPtr and transparent comparisons.22a8e1526
Clean up CBC_DefaultPlacement.f10010959
Switch CPDF_TextPage::m_CharIndices back to DataVector.f24061bf2
Create helper function and move a constant to a header file07d7f6b34
Remove ALLOW_UNUSED macros.ba4ecd0a5
Use UnownedPtr<> keys in CPDF_FontGlobals.275ee19d0
Add transparent Contains() test to unowned_ptr_unittest.cpp081fa0b6f
Prevent pdfium::Contains() from falling back to linear search.101e5c6be
Prove whether unowned/retain pointer collections compare transparently9524684f4
[Skia] Remove DCHECKs on RGB channels during upsampling9b9170e56
Add unit test for transparent comparison of UnownedPtr.8aad22ae5
Make CPDF_{Array,Dictionary} methods returning pointers internal-only.4424a54c6
Refactor Skia renderer runtime checks.7784e6a6b
Runtime renderer selection for embedder tests786e8f65d
Add FPDFAnnot_GetFormFieldAlternateName() API
3.0.0
Changes (Release 3.0.0)
Summary (pypdfium2)
-
Support model
API-breaking changes
- If the target page of a bookmark cannot be identified,
OutlineItem.page_index
is nowNone
rather than-1
, to avoid accidental reverse list indexing and to enforce that callers properly handle this case. Moreover,OutlineItem.is_closed
is nowNone
rather thanFalse
if the bookmark has no kids. PdfPageObject.get_type()
was replaced with atype
attribute.PdfPage.count_objects()
was removed. UsePdfPage.get_objects()
or the raw PDFium API instead.- If a negative index is passed to
PdfDocument.new_page()
, it is now interpreted in reversed direction, rather than inserting at the beginning. - PDFium is now provided with an external, python-allocated buffer for rendering. This has numerous advantages, most notably that callers don't need to free resources anymore.
PdfPage.render_base()
now directly returns a ctypes ubyte array;BitmapDataHolder
has been removed. - Changed rendering parameters
annotations
was renamed todraw_annots
colour
was renamed tofill_colour
and now only takes a list of 4 values for simplicity - it may not be 3 values orNone
anymoreno_antialias
has been replaced with separate boolean optionsno_smoothtext
,no_smoothimage
, andno_smoothpath
Other changes
OutlineItem
now contains information on the number of sub-items (n_kids
attribute).- All document-level methods that take a page index now accept negative values for reverse indexing (except the rendering methods).
- New method
PdfDocument.get_page_size()
to retrieve page size by index without needing to load aPdfPage
(usesFPDF_GetPageSizeByIndexF()
under the hood). - New rendering parameters added:
colour_scheme
,fill_to_stroke
,force_halftone
,draw_forms
,rev_byteorder
,prefer_bgrx
,force_bitmap_format
,extra_flags
,allocator
, andmemory_limit
. - Added new
render_to()
functions toPdfPage
andPdfDocument
that take a custom bitmap converter, to transform the ctypes array to a different object. A set of built-in converters is provided with theBitmapConv
class. Confer the updated API documentation for details. The previous rendering functions (render_topil()
render_tobytes()
, ...) are still around as aliases but might be deprecated eventually. - New rendering target
numpy_ndarray
added. - The
pil_image
rendering target now accepts aprefer_la
parameter to request automatic conversion ofBGRA
/RGBA
toLA
if rendering in greyscale mode with alpha channel. PdfPage.get_objects()
can now recursively descend into Form XObjects.- Form environments are now initialised/exited on document level rather than on page rendering. In the course of this work, a segmentation fault source was eliminated, related to a formerly undocumented requirement of PDFium regarding object lifetime. Whether the segmentation fault would actually take place was dependent on Python garbage collection behaviour. This did not appear to happen under normal circumstances, so the issue remained unnoticed for a long time.
- If the target page of a bookmark cannot be identified,
-
Setup code
$PYP_TARGET_PLATFORM
was renamed to$PDFIUM_BINARY
, the valuesdist
was renamed tonone
.- When doing an automatic release, repository changes are now only pushed after successful wheel building, to avoid leaving the repository in an invalid state in case some earlier step fails.
- pypdfium2 now declares a no-op setuptools extension to prevent wheel content from landing in a
purelib
folder. Some systems use this information to separate platform-dependent packages from pure-python packages (i. e./usr/lib64
instead of/usr/lib
). Confer PEP 427. - Autorelease now properly takes existing beta tags into account for its version changes.
- PDFium's commit log is now shown with GitHub releases.
- The wheel packaging script now restores in-tree artefacts from a possible editable install.
- Platform files are now detected in a more robust way. If missing, a proper exception will be raised.
- Platform data directories are now annotated with a text file storing the pdfium version, to prevent a possible mismatch between the state of
version.py
and the actual version of the used binary. The update and build scripts do not directly change the main version file anymore, but defer the changes tosetup.py
. - Missing platform files are now always procured implicitly on installation. If platform files exist already but are outdated, they will be updated by default. You may opt out by creating an empty file called
.lock_autoupdate.txt
indata/
. - A
MANIFEST.in
file was added to avoid being dependent onsetuptools_scm
. - On setup, dependency checks are now only done for system commands. The wonky implicit installation of missing Python packages was removed. If opting out of build isolation, callers should properly install setup dependencies beforehand.
-
Documentation
- Rewrote the project's
README.md
. Added more support model examples and an extensive guide regarding the raw PDFium/ctypes API. - Improved docstrings and included type hints.
- Rewrote the project's
3.0.0b1
Changes (Release 3.0.0b1)
Summary (pypdfium2)
-
Support model
API-breaking changes
- If the target page of a bookmark cannot be identified,
OutlineItem.page_index
is nowNone
rather than-1
, to avoid accidental reverse list indexing and to enforce that callers properly handle this case. Moreover,OutlineItem.is_closed
is nowNone
rather thanFalse
if the bookmark has no kids. PdfPageObject.get_type()
was replaced with atype
attribute.PdfPage.count_objects()
was removed. UsePdfPage.get_objects()
or the raw PDFium API instead.- If a negative index is passed to
PdfDocument.new_page()
, it is now interpreted in reversed direction, rather than inserting at the beginning. - PDFium is now provided with an external, python-allocated buffer for rendering. This has numerous advantages, most notably that callers don't need to free resources anymore.
PdfPage.render_base()
now directly returns a ctypes ubyte array;BitmapDataHolder
has been removed. - Changed rendering parameters
annotations
was renamed todraw_annots
colour
was renamed tofill_colour
and now only takes a list of 4 values for simplicity - it may not be 3 values orNone
anymoreno_antialias
has been replaced with separate boolean optionsno_smoothtext
,no_smoothimage
, andno_smoothpath
Other changes
OutlineItem
now contains information on the number of sub-items (n_kids
attribute).- All document-level methods that take a page index now accept negative values for reverse indexing (except the rendering methods).
- New method
PdfDocument.get_page_size()
to retrieve page size by index without needing to load aPdfPage
(usesFPDF_GetPageSizeByIndexF()
under the hood). - New rendering parameters added:
colour_scheme
,fill_to_stroke
,force_halftone
,draw_forms
,rev_byteorder
,prefer_bgrx
,force_bitmap_format
,extra_flags
,allocator
, andmemory_limit
. - Added new
render_to()
functions toPdfPage
andPdfDocument
that take a custom bitmap converter, to transform the ctypes array to a different object. A set of built-in converters is provided with theBitmapConv
class. Confer the updated API documentation for details. The previous rendering functions (render_topil()
render_tobytes()
, ...) are still around as aliases but might be deprecated eventually. - New rendering target
numpy_ndarray
added. - The
pil_image
rendering target now accepts aprefer_la
parameter to request automatic conversion ofBGRA
/RGBA
toLA
if rendering in greyscale mode with alpha channel. PdfPage.get_objects()
can now recursively descend into Form XObjects.- Form environments are now initialised/exited on document level rather than on page rendering. In the course of this work, a segmentation fault source was eliminated, related to a formerly undocumented requirement of PDFium regarding object lifetime. Whether the segmentation fault would actually take place was dependent on Python garbage collection behaviour. This did not appear to happen under normal circumstances, so the issue remained unnoticed for a long time.
- If the target page of a bookmark cannot be identified,
-
Setup code
$PYP_TARGET_PLATFORM
was renamed to$PDFIUM_BINARY
, the valuesdist
was renamed tonone
.- When doing an automatic release, repository changes are now only pushed after successful wheel building, to avoid leaving the repository in an invalid state in case some earlier step fails.
- pypdfium2 now declares a no-op setuptools extension to prevent wheel content from landing in a
purelib
folder. Some systems use this information to separate platform-dependent packages from pure-python packages (i. e./usr/lib64
instead of/usr/lib
). Confer PEP 427. - Autorelease now properly takes existing beta tags into account for its version changes.
- PDFium's commit log is now shown with GitHub releases.
- The wheel packaging script now restores in-tree artefacts from a possible editable install.
- Platform files are now detected in a more robust way. If missing, a proper exception will be raised.
- Platform data directories are now annotated with a text file storing the pdfium version, to prevent a possible mismatch between the state of
version.py
and the actual version of the used binary. The update and build scripts do not directly change the main version file anymore, but defer the changes tosetup.py
. - Missing platform files are now always procured implicitly on installation. If platform files exist already but are outdated, they will be updated by default. You may opt out by creating an empty file called
.lock_autoupdate.txt
indata/
. - A
MANIFEST.in
file was added to avoid being dependent onsetuptools_scm
. - On setup, dependency checks are now only done for system commands. The wonky implicit installation of missing Python packages was removed. If opting out of build isolation, callers should properly install setup dependencies beforehand.
-
Documentation
- Rewrote the project's
README.md
. Added more support model examples and an extensive guide regarding the raw PDFium/ctypes API. - Improved docstrings and included type hints.
- Rewrote the project's
pypdfium2 commit log
Commits between 2.11.0
and 3.0.0b1
(latest commit first):
03b379f
[autorelease] update changelog and version file75b972c
update_pdfium: make max_workers configurable69a0b77
autorelease: nevermind, always include the log76fc08e
Finalise changelog_staging21dc9b0
Misc improvementsb02b67b
workflow: re-activate schedule0378257
Slightly improve converter docs6a24cc4
Revert "textpage: replacecount_chars()
withchar_count
attribute"7f2e9ff
Update some docs18221b4
readme: suggest usingget_functype()
1b8d7f1
tocprinter: avoid some variable assignmentsff52551
Update tasks6d00654
Make most of_utils.py
public2c82267
readme: fix use of non-public membercc70047
utils: renamebg_colour
tofill_colour
d960830
Rename back fromcolor
tocolour
69c780f
rendering: rework colour integration26bf175
textpage: replacecount_chars()
withchar_count
attribute038feb2
Improve string decoding6b14960
docs: decide not to deprecaterender_to*
methods just yet97d2243
Update rendering CLIfc736ec
auto_bitmap_format(): flatten if/else treec44d81a
multipage renderer: add missing close() callsf8608e8
SetOutlineItem.is_closed
toNone
if it has no kids1f2b75b
toc/OutlineItem
: Addn_kids
attribute1093579
Provide means to plug in custom converters (#140)e513026
render_topil: use frombuffer() rather than frombytes()d17cffd
autorelease: make commit log collapsible9d4a3fc
autorelease: allow skipping commit log3df1533
autorelease: improve changelog handling f...