Releases: pypdfium2-team/pypdfium2
4.30.0
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 theextract-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 beforelen(pdf)
. - Made
get_text_range()
allocation adapt to pdfium version, asFPDFText_GetText()
has been reverted to UCS-2. (See v4.28 changelog for background.) - Updated workflows to include both
macos-13
andmacos-14
in test matrices because v13 is Intel and v14 ARM64 on GH actions. Removed python 3.7 testing because not supported anymore onmacos-14
runners.
pypdfium2 commit log
Commits between 4.29.0
and 4.30.0
(latest commit first):
6bf53c4
[autorelease main] update 4.30.01e9e100
Add changelog entry for workflows5ad40ab
Test both macOS ARM64 and Intel in all workflows600d36c
Try to fix main workflow (GH arch change in macOS-latest)a057218
Add changelog for backports653c38c
textpage: update docs2577f5b
[BP] CLI/render: fix XFA document length recognitioneded6c2
get_text_range(): adapt allocation to pdfium version7ce4d31
PdfImage.extract(): fix for filenames containing non-extension dot5dc2eee
issue templates: reorder commands493742d
Make issue templates slightly nicer391575a
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 regression01ea79cec
Update hooks for reclient95b1aabea
Add one more pixel test for an edited PDF that regressedaaf2cc937
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 f284b6b47039a2d7edfcbfc51f52664f82b5a789fa8edc249
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-gomaip8342a586d
Use spancpy() in more places02ff1756c
Fix yet another edited PDF that regressed7d687a0a3
Introduce {Byte,Wide}String::span_with_terminator().64447358e
Mark fx_memcpy_wrappers.h functions UNSAFE_BUFFER_USAGE.7cf8895f6
Enable fuzzing with Skia enabled155028a48
Add yet another pixel test for an edited PDF that regressedff78e42df
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.cppfde20e170
Deduplicate code in CPDF_Parser and rename some methods763c169be
Fix parsing of PDFs with multiple cross reference streamsbc759a2ae
Add another pixel test for an edited PDF that regressed2c66e07e9
Spanify CFX_SeekableStreamProxyd6a4b27d8
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 repo0e4ff8cd8
Roll Zlib from c5bf1b566e5d to d076d8bd0898 (6 revisions)- [
5a49e751e
](https://pdfium.google...
4.29.0
Changes (Release 4.29.0)
Summary (pypdfium2)
pypdfium2 commit log
PDFium commit log
Commits between 6337
and 6406
(latest commit first):
b756612c7
Use the new v8 interceptor APIafc399ff5
Roll v8/ fe4ad3b98..f6f7c6822 (302 commits)6af6c6197
Fix unsafe pointer usage in CJX_HostPseudoModelb9ebffc36
Fix typo in {Byte,Wide}StringView.TrimmedRight tests567dff87b
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 treee4cebef61
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-gomaip9dfab8917
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_RGB0095eef10
Improve comments and naming in calculate_pitch.hd43b6ce46
Update gn_version to 93ee9b91423c1f1f53fb5f6cba7b8eef6247a5648ba296abd
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_RGBffbbea8d3
Add struct FX_RGB2238fbe1b
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 savefb8abcb82
Enforce checking the return value of CFX_DIBitmap::Create()8111f8946
Put unsafe buffer configuration into PDFiumfe581ab87
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 array1f9ae706c
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 dependency27062af25
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.pyadc1b16a3
Set a default GN enable_safe_libstdcxx value2f6cef867
Avoid a compiler compatibility issue with CPDF_DefaultAppearancee15b92e44
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 methods7063716b1
Avoid calls to c_str() in cpdf_filespec.cpp.c9f2bf183
Avoid duplicate checks in StringViewTemplate<>::Substr().70e774a94
Remove dead code in RenderPageImpl() calleesb039c387e
Improve generated content stream data in cpdf_generateap.cppb119e4ac5
Make FPDFAnnotEmbedderTest.Bug1206 resiliant to changes1eac2c692
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...
4.28.0
Changes (Release 4.28.0)
Summary (pypdfium2)
get_text_range()
: Fixed a buffer size regression introduced in v4.26.0, caused by an unexpected behavior change in pdfium (thanks @elonzh for the bug report, {issue}298
). Since that change, it is not possible anymore to tell the exact amount of memory needed, so we have to allocate for the worst case. Therefore, while this problem persists, it is recommended to instead useget_text_bounded()
where possible.
pypdfium2 commit log
Commits between 4.27.0
and 4.28.0
(latest commit first):
6d96769
[autorelease main] update 4.28.08f6ecb0
readme/caller-datafiles: update ctypesgen command02cd006
Reduce some RST indents from 4 to 3cd770e6
Add ability to forceget_text_range()
8daf76b
textpage: fix up some typos380f30f
Changelog for #29847a2b81
Possible workaround against #298 / pdfium bug 2133 (#301)26e7f60
readme: slightly rephrase2f297a5
Add contributions/response policy
PDFium commit log
Commits between 6281
and 6337
(latest commit first):
09fbd30d5
Rename string's raw_span() method to unsigned_span().ef0eeaa9e
Fix wrong matrix outputs in CPDF_PageContentGenerator for path objectsf19f46647
Fix wrong matrix outputs in CPDF_PageContentGenerator for text objects081e8bb68
Fix incorrect current transformation matrix when saving PDFs28483abbe
Add path objects tests for a PDF saving bug78e300622
Change GetColor() to WriteColorToStream()be20f54f3
Update UNSAFE_BUFFER macros to match chromium/src/base71e2229aa
Add text object version of a more complex test for a PDF saving bugff374196e
Remove out-parameters from CPDF_Color::GetRGB()967494c5e
Remove out-parameters from CPDF_ColorState::Set{Color,Pattern}()3189488fe
Do no write out identity matrices in CPDF_PageContentGenerator8ebeb124b
Fix building with GCC504ae0c73
Fix nits in CPDF_PageContentGeneratorTest3055d3857
Make CFX_RenderDevice::GetDIBits() take RetainPtrs by value36cd3f41e
Rename some colorspace methodsac728e5cb
Rename CPDF_ICCBasedCS member variables8fa6a324c
Roll third_party/zlib/ 646b7f569..3787595bb (4 commits)03e96fc9d
Remove the matrix from CPDF_GeneralState624807fbd
Avoid "unsafe" string indexing in PDF_NameEncode().f1805084d
Convert EXPECT_STREQ(x, y.c_str()) to EXPECT_EQ(x, y).0c6ef5db1
Avoid result string with trailing NUL in XFA Decode().82e2c19b8
Roll third_party/skia/ 9832c7722..49f18efdf (331 commits)85589aac0
Roll Catapult from f448d5bf8e57 to 4dc7721a1444 (93 revisions)22f234e4d
Roll libpng from f11b2ae20fa0 to 3c7486b231c7 (2 revisions)530f34f13
Roll third_party/skia/ 6279c88b9..9832c7722 (80 commits)60bcaeb27
Make core/fxcrt compliant with UNSAFE_BUFFERS() macro.0744e71e2
Avoid some UNSAFE_BUFFER noise in fpdf_parser_utility.h.df60f7f4c
Fix incorrect matrix outputs in CPDF_PageContentGenerator074387f08
Add a more complex test for a PDF saving bug88eff81cc
Add a test case for a PDF saving bug314d76477
Simplify PDF_EncodeText() using FX_UTF16Encode()af1239af6
Make CPDF_IccProfile's dependency more direct3771a29b4
Remove CFX_Font::IsEmbedded()050ae79e8
Stop making CPDF_IccProfile an Observable038d39b31
Avoid more future unsafe buffer usage in StringDataTemplate.9108588e6
Move remaining code out of third_party/base and into core/fxcrtb8ea87677
Remove remaining NoDestructor usage01e6d560e
Convert some C-style arrays to std::array<>.a7fca8a4f
Add a way to undo a previous FPDF_SetSystemFontInfo() callb4fb36188
Re-write some unsafe string code prior to UNSAFE_BUFFERS.fec5a9706
Roll v8/ b6fd2f17b..a86e19715 (464 commits)04a9cf6cb
Make CodePointView::Iterator() demonstrably safe.f3209d029
Fix build with chrome plugin enabled but Partition Alloc disabled,7f1ff0f44
Roll MarkupSafe from 0bad08bb207b to e582d7f0edb9 (1 revision)2be9efb5f
Roll Instrumented Libraries from 0011c28c8d35 to 0893d760101b (1 revision)132a5215a
Roll Jinja2 from e2d024354e11 to c9c77525ea20 (1 revision)43bfc30b0
Copy absl::WrapUnique()'s static_asserts into pdfium::WrapUnique()6261e1499
Remove code in the form of "return std::move(local_var);"d72fd575f
Move third_party/base/ptr_util.h to core/fxcrt34e34057a
Merge third_party/base/memory/aligned_memory.h into fx_memory.hee6325efe
Move third_party/base/t...
4.27.0
Changes (Release 4.27.0)
Summary (pypdfium2)
- Added ability to define
$CTYPESGEN_PIN
when building sdist via./run craft pypi --sdist
, which allows to reproduce our sdists when set to the head commit hash ofpypdfium2-team/ctypesgen
at the time of the build to reproduce. Alternatively, you may patch the relevantpyproject.toml
entry yourself and usePDFIUM_PLATFORM=sdist python -m build --sdist
as usual. - Set up Dependabot for GH Actions. Updated dependencies accordingly.
pypdfium2 commit log
Commits between 4.26.0
and 4.27.0
(latest commit first):
4c4c362
[autorelease main] update 4.27.02d165af
readme: remove outdated helper112fb34
Readme: mention prominent embeddersb0352a1
Correctly reland commit 0d1cc2134b356b
Revert "Bump setup-miniconda 2->3 & {upload,download}-artifact 3->4"137b71a
Add dependabot to changeloged32d64
dependabot: ignore broken workflow-dispatch 121d94ee90
build(deps): bump actions/setup-python from 4 to 5ca59682
build(deps): bump actions/upload-pages-artifact from 1 to 300556fe
Bump deploy-pages from 1 to 4 (closes #294)21ca95b
Create dependabot.yml for GH actions0d1cc21
Bump setup-miniconda 2->3 & {upload,download}-artifact 3->49cb5c38
Remove some legacy code for conda_rawa584927
misc improvements0324787
workflows/test_sourcebuild: check version9289258
workflows/test_sourcebuild: fix typo3b4ef4b
Try to fix sourcebuild2e84994
autorelease: remove excessive note/todo/fixme marksa8c3cd3
Removegit status
assertbb68b1a
dirty: pass through previous state via env vardb4ebbb
Add some checks before ignoring dirty state4558229
ctypesgen: allow passing in custom pre-processor7248bc4
build: call into API directlyfab4102
Avoid odd use ofany()
whereor
does the trickd968173
readme/PDFIUM_PLATFORM
: account fornone
->sdist
renaminga2d66dd
Update changelog71b7a20
craft_packages/pypi: allow building sdist/wheels only629bb97
craft_packages: make ctypesgen pin configurableaf5216b
slightly polish manifest / setup.cfgebc8715
Bump copyright year24d438f
fix license of ./run script3e93f56
Amend changelogc72b7a9
Revert "temporarily comment out testpypi upload"
PDFium commit log
Commits between 6233
and 6281
(latest commit first):
7c7a6087e
Add FPDFText_LoadCidType2Font() API41015d113
Encapsulate FT_Get_Glyph_Name() calls in CFX_Face4d00d9737
Fix another typo in ToUnicode template constantf22325c95
Make PDF_USE_SKIA a public build definitionccc38c258
Remove more dead code in CFX_DIBitmap8abe178b4
Clean up CPDF_RenderStatus::LoadSMask()fe586ee39
Remove dead code in CFX_DIBitmape24607c76
Roll base/allocator/partition_allocator/ 72b7e1a3f..42bf756b3 (38 commits)202ebe6ad
Roll Catapult from f2abc0cd0cd8 to f448d5bf8e57 (64 revisions)dfd1ec916
Roll Memory Tools from 216d33bbf954 to 4753a8cbcd7c (4 revisions)9a2b614bd
Roll libpng from 1db23788f5aa to f11b2ae20fa0 (1 revision)bdfe4aa57
Unshare CFX_DIBitmap::SetChannelFromBitmap()4bf70256b
Remove CFX_Face::GetAdjusted{Ascender,Descender} methods6f3cf81a8
Change MultiplyAlphaMask() to take a CFX_DIBitmap82f4360b8
Consolidate code into CPDF_ImageRenderer::CalculateDrawImage()cbf5da504
Refactor LoadCompositeFont() to extract useful helper functionsa88402105
Check for errors first in LoadSimpleFont() and LoadCompositeFont()e06220af3
Rename many variables inside fpdf_edittext.cpp7666160f5
Fix various nits inside fpdf_edittext.cpp (for reals)f689b6a68
Fix various nits inside fpdf_edittext.cppd617c4e8b
Update readme for Reclient instead of Goma32c29e431
Encapsulate more bounding box code in CFX_Face3f7847662
Move NormalizeFontMetric() out of CPDF_Fonta0fd10adf
Rewrite and rename CPDF_Font::TT2PDF()4be416d76
Give variables better names in CPDF_ImageRenderer54f25ce7a
Ensure CPDF_Stream always has a dictionary720ffea6a
Fix typo in ToUnicode template constant8acd78867
Remove the ability to create an u...
4.26.0
Changes (Release 4.26.0)
Summary (pypdfium2)
- Pin ctypesgen in sdist to prevent reoccurrence of {issue}
264
/ {issue}286
. As a drawback, the pin is never committed, so the sdist is not simply reproducible at this time due to dependence on the latest commit hash of the ctypesgen fork at build time.
pypdfium2 commit log
Commits between 4.25.0
and 4.26.0
(latest commit first):
93650f0
[autorelease main] update 4.26.08f45f33
temporarily comment out testpypi uploadd11ed9f
Add changelog regarding sdist7aba111
Presumably fix PyPI upload of sdist (ignore dirty)1e7536f
Add back manylinux2014 to be on the safe sideb774be5
some cleanups2eb90a2
Slightly improve PR templatea1a1d37
conda_helpers: blacklist pdfium 6219a521a6e
readme: move down condaba2db80
setup/bindings: fix flags not being passed throughcf256ee
Adapt to change in pdfium headers6ef3b44
add back srcinfo to bindings file0db98b4
Mark regex as sucha9d6dfc
Adapt to c_void_p -> int auto-cast47857b6
sdist: implement ctypesgen pin7e90ecd
Call into ctypesgen API directly51612d3
Counterpart to ctypesgen library_sharing branch (#285)
PDFium commit log
Commits between 6164
and 6233
(latest commit first):
29ff08e81
Roll v8/ fc242dcac..83ad2aebb (53 commits)a7424743f
Add third_party/fp16 dependencyf6d55c802
Relax pitch check in CFX_DIBitmap::CalculatePitchAndSize()06b951386
Enhance FixedSizeDataVector<>.d7e87b0a6
Roll tools/clang/ dbe34d7b7..2b9d966ec (5 commits)4337c488a
Roll buildtools/ and third_party/libc++/src/2049878d9
Show FPDFBitmap_GetFormat() issue for bitmaps with external buffer950682b99
Use std::vector<> in testing/test_fonts.h43f921adf
Roll v8/ 3469157c0..fc242dcac (66 commits)143c5b262
Update reclient_version to 0.125.0.f3883c2-gomaipfbd64b666
Roll third_party/libunwind/src/ 278e5fbaf..2602aecdf (3 commits)05af9ea18
Roll third_party/libc++abi/src/ 4cb5c2cef..8806fb8bb (5 commits)da14fcb53
Simplify matcher string in fxcrt death tests4821f9fb8
Update android_toolchain_version to wpJvg81kuXdMM66r_l9Doa-pLfR6S26Jd1x40LpwWEoC62938cd83
Update gn_version to 85944ebc24a90ec1e489e85a46fdc68542c3146fa03eebd66
Add missing FontEncoding::kNone value8810061a8
Roll tools/rust/ 9f2ba7f84..e721a72ad (11 commits)dddfd7190
Roll third_party/freetype/src/ 8f255c89e..ca76683b7 (8 commits)3eae66ac2
Roll third_party/skia/ e0768dea5..a9db1213b (208 commits)a2f26cdf4
Roll build/ 9b8bc79c2..9ca0d2ce9 (79 commits)328af3224
Fix Skia + EMF rendering for transparencies899ff64f2
Roll base/allocator/partition_allocator/ 82380dc78..72b7e1a3f (24 commits)f2d10c6cb
Roll third_party/abseil-cpp/ 0764ad493..b7ad4e9ef (9 commits)593dcd2d9
Roll Memory Tools from 884774321e20 to 216d33bbf954 (2 revisions)a7755c59d
Roll Catapult from f0228fa92b0a to f2abc0cd0cd8 (60 revisions)88ad55aba
Make fxge::FontEncoding independent from FT_Encoding7b129a284
Encapsulate FT_Get_First_Char() and FT_Get_Next_Char()704cc481c
Fix regression where FPDFText_FindNext() cannot find the search term471679d54
Use the dedicated ConfigurePartitionsForTesting()3e624ce0f
Roll base/allocator/partition_allocator/ e9591a3fa..82380dc78 (24 commits)9f94a1a4a
Add more FPDFTextEmbedderTests for finding text45a5ea16c
Add FPDFTextEmbedderTest case to show FPDFText_FindNext() regressed3f3cb7b65
Validate width against stride in CFX_DIBitmap::CalculatePitchAndSize().24a713a85
Remove CPDF_CrossRefTable::ObjectType::kObjStream57e284ba2
Roll Zlib from 5daffc716bb6 to 562a4372d176 (12 revisions)a2c91f07a
Encapsulate FT_Get_Sfnt_Table() calls2708849c4
Encapsulate FT_Load_Sfnt_Table() calls592da1277
Encapsulate FT_Get_Char_Index() and FT_Get_Name_Index() calls7f50e6e23
Encapsulate font charmap code inside CFX_Facea9d080a7f
Deduplicate constants / macros between cfx_face.cpp and cfx_font.cpp4870bd3e2
Move some FreeType-specific code from CFX_Font to CFX_Facebd3e9f3d9
Remove unused CFPF_SkiaFont code65dc04dda
Move CFX_GlyphBitmap creation code into CFX_Face::RenderGlyph()4f26084fa
Remove spurious fx_freetype.h includes- [
b2d4f1104
](https:/...
4.25.0
Changes (Release 4.25.0)
Summary (pypdfium2)
- Removed multiprocessing from deprecated
PdfDocument.render()
API and replaced with linear rendering. See below for more info. - setup: Fixed blunder in headers cache logic that would cause existing headers to be always reused regardless of version. Note, this did not affect release workflows, only local source re-installs.
- Show path of linked binary in
pypdfium2 -v
. - conda: Improved installation docs and channel config.
- conda/workflows: Added ability to (re-)build pypdfium2_raw bindings with any given version of pdfium. Fixes {issue}
279
. - Made reference bindings more universal by including V8, XFA and Skia symbols. This is possible due to the dynamic symbol guards.
- Instruct ctypesgen to exclude some unused alias symbols pulled in from struct tags.
- Improved issue templates, added pull request template.
- Improved ctypesgen (pypdfium2-team fork).
Rationale for PdfDocument.render()
deprecation
- The parallel rendering API unfortunately was an inherent design mistake: Multiprocessing is not meant to transfer large amounts of pixel data from workers to the main process.
- This was such a heavy drawback that it basically outweighed the parallelization, so there was no real performance advantage, only higher memory load.
- As a related problem, the worker pool produces bitmaps at an indepedent speed, regardless of where the receiving iteration might be, so bitmaps could queue up in memory, possibly causing an enormeous rise in memory consumption over time. This effect was pronounced e.g. with PNG saving via PIL, as exhibited in Facebook's
nougat
project. - Instead, each bitmap should be processed (e.g. saved) in the job which created it. Only a minimal, final result should be sent back to the main process (e.g. a file path).
- This means we cannot reasonably provide a generic parallel renderer, instead it needs to be implemented by callers.
- Historically, note that there had been even more faults in the implementation:
- Prior to
4.22.0
, the pool was always initialized withos.cpu_count()
processes by default, even when rendering less pages. - Prior to
4.20.0
, a full-scale input transfer was conducted on each job (rendering it unusable with bytes input). However, this can and should be done only once on process creation.
- Prior to
- pypdfium2's rendering CLI cleanly re-implements parallel rendering to files. We may want to turn this into an API in the future.
Due to the potential for serious issues as outlined above, we strongly recommend that end users update and dependants bump their minimum requirement to this version. Callers should move away from PdfDocument.render()
and use PdfPage.render()
instead.
pypdfium2 commit log
Commits between 4.24.0
and 4.25.0
(latest commit first):
45dbb2c
[autorelease main] update 4.25.06f5df31
workflows/main: minor comments cleanup4c0aee6
conda: get rid of effectively dead bundling code816f421
craft_packages: cut overly extensive commentsd140de2
Handle latest version separately for conda pdfium/pypdfium2_raw63a17ba
conda: sync pypdfium2_raw schedule with pdfium-binariescdb1fe4
instruct ctypesgen to exclude some garbage symbolsadf89b0
docs correctionafc4740
reinstall schedule6024f15
Make document-level renderer harmless by linearization (#282)7c53bd1
temporarily inhibit schedule0fe8578
ctypesgen: add --no-macro-guards8f0a425
readme: update ABI bindings section6a0a67b
get_text_range: slightly enhance docs5886522
improve changelog/template, add tasksacd1719
conda/recipes: do not wrap env vars in quotes after allf3cc2dd
continue on refbindings0822682
continue on PR template (setup)e26b24d
Prepare changelogf93532d
setup: avoid explicit mention of clangad56b56
docs: continue on conda54d2ffc
craft/conda: update a code comment59dc178
issue-templates: rename "package" to "install" in titles9a1dcd3
Inline build version handling in craft_packages3b418eb
conda_raw: handle rebuilds (#280)ecb77d2
Add skia to refbindings flags (+ thoughts on external headers)01727fc
setup-miniconda: correct channel prioa5f2c5b
PR template nits100d7e4
Tighten issue template descriptionsddc8abc
refbindings: define feature flags136a655
setup: fix blunder in headers cache logic67de448
Continue on PR templatea1037a3
Add draft pull request template9f54a76
issue template generic: clarify checkbox 2 (CC #277)c5c558a
Add note on version info8b454c0
nits24839ea
conda: slightly improve script and recipes9e73c75
wf/conda: try to make sure we install the built package8a438f8
readme: conda section again2fbac25
workflows/conda: remove a redundant layer of channelsc6dd1d1
readme: rework conda section again28649ad
issues/conda: check python executable07d336e
readme: revise conda instructions45e8f0c
cli/version: show only libpath rather than whole loader info81f24de
dep5-wheel: add helpers version file09d194f
manifest: fix missing reuse/dep5 include blunder1cf9442
req: sunset defaults.txtd95efed
req: test implies converters- [
9e29101
](https://github.com/pypdfium2-team/pyp...
4.24.0
Changes (Release 4.24.0)
Summary (pypdfium2)
- Added GitHub issue templates
pypdfium2 commit log
Commits between 4.23.1
and 4.24.0
(latest commit first):
71d143f
[autorelease] update changelog and version filec49dcca
temporarily comment out testpypi uploada222c06
Fix sdist package getting wrong name1b0a5c6
slightly polish previous commitabd8a4f
sourcebuild: actually fix version (closes #276)13ae34b
Fix generic issue template stylee10f667
Revert "sourcebuild: try to fix version..."01c2355
sourcebuild: try to fix version...4f2d3cc
sourcebuild: add fixme regarding version923e258
sourcebuild: build config correctionsa7e5aa3
readme/install-system-caller: revise origin again51da8a6
workflows/trigger: temporarily comment out main schedule7d31730
setup nits/comments9ca64b9
readme/install-source-caller: change origin format51dab26
readme/issues: continue286294b
readme: add anchor icons to linksd7ef006
Add draft instructions to build with caller-provided files798b02b
sourcebuild: comment outuse_custom_libcxx
a308025
to_full(): use namedtuple, improve sourcebuild version style46e81b1
emplace: add back prettier reprd23b9f8
issue template nitsddab675
Revert "Make conda and prepared detectable"063e4ec
Make conda and prepared detectablef04f757
readme: try to make install sections linkable without heading04c095d
Continue on issue templates44946e2
Add comment regarding to_full()a4fc943
bindings cache: take guard_symbols into account3f3dd40
emplace: improve prints6d860a4
emplace/bindings: use cached headers if availablebe2e25d
emplace: use binary cache if only bindings are missing8a33235
refbindings: allow system library loadingdf54e88
update_pdfium: fix descriptions (CC #272)a397ff7
templates/conda: add call toconda config --get
39e12e0
ctypesgen: add --no-system-libsearch if --runtime-libdirs given0dd8e34
Improve issue templatesdb1e956
Add basic issue templates (#271)a5454bf
Minor style improvements3aa6c15
slightly reorder conda instructions (install line first)5fb49a5
Simplify conda instructions341c360
conda_helpers: avoid embedding test suite
PDFium commit log
Commits between 6097
and 6110
(latest commit first):
0a34b6b28
Convert std::vector<v8::Local> to v8::LocalVector.607c3faa1
Fix potential leak in CGdiplusExt90589d465
Replace const-ref std::vector arguments with pdfium::span in fxjs.fc412acd0
Revert recent C++20 usage in CFX_FillRenderOptions03c04196f
Remove unnecessary LoadLibrary() call in CGdiplusExtfdb409aaf
Roll third_party/freetype/src/ 7b308a29d..55d0287cf (17 commits)9091e26f4
Add a test for rendering a transparency onto a white background647a08001
Add support for the Rust toolchain9cb2d6887
Update gn_version to e4702d7409069c4f12d45ea7b7f0890717ca3f4be5f05d9c6
Roll third_party/libjpeg_turbo/ 30bdb85e3..9b894306e (2 commits)df282a629
Roll third_party/icu/ 985b9a6f7..a622de35a (2 commits)9f182f957
Roll abseil-cpp, libcxx, libcxxabi, clang, buildtools and builda3895af47
Roll Catapult from 4f81c1e29597 to 47efdb4b1428 (70 revisions)
4.23.1
4.23.0
Changes (Release 4.23.0)
Note: (Test)PyPI upload failed for this release due to an oversight.
Summary (pypdfium2)
- Fixed faulty version repr (avoid trailing
+
if desc is empty). - Merged conda packaging code, including CI and Readme integration.
- Updated setup code, mainly to support conda.
- Independent bindings cache. Download headers from pdfium. Extract archive members explicitly.
- Cleaned up version integration of sourcebuild.
- Changed
system
platform to generate files according to given version, instead of expecting given files. - Added
prepared!
prefix to platform spec, allowing to install with given files. - Added
PDFIUM_BINDINGS=reference
to use pre-built bindings when installing from source.
- Updated Readme.
pypdfium2 commit log
Commits between 4.22.0
and 4.23.0
(latest commit first):
9863624
[autorelease] update changelog and version file3461c41
ci: fix trigger_main5f136b6
conda: fix test run on windows28b3b8c
update changelog_staging0ce8207
workflow: add task7431eca
Merge pull request #269 from pypdfium2-team/conda_ci5227e2b
unlock anaconda upload6bb7b6e
Conda CI1565920
Ask third party packagers to mark unofficial builds as such1b20e4f
conda: use consistent org namec2e9bd1
fix typo in changelog645d407
readme nitee5a2ff
Conda packaging code (#268)844879a
readme: fix typod4fd2e4
craft_packages: correct artifact count check1fa40b8
nit: fix another commentc80ab06
reuse: improve formatting consistency7f61905
nit: fix some license related comments92fa3da
Add option to use reference bindingsb6141e7
misc style improvements7b08870
Fix faulty version repr
PDFium commit log
Commits between 6070
and 6097
(latest commit first):
f96e865f1
Fix incorrect font dictionary usage in GeneratePopupAP()604e6dc62
Use base::Reversed() in CFX_FontMapper::MatchInstalledFonts()2c55d42f8
Fix off-by-one error in CPDF_SimpleFont::LoadCommon()b313dec8a
Deduplicate font dictionary creation code in cpdf_generateap.cpp5956b29a9
Remove NoDestructor usage in timer classes6b79c5102
Remove NoDestructor usage in progressive image decoders7e26566ee
Switch to NOTREACHED_NORETURN() in a couple more files12eaa1a83
Remove superfluous base/numerics includesd36d5ab4c
Saturate cast in CPDF_Font::GetCharBBoxForFace()341abde5b
Consolidate identical code into CPDF_Font::GetCharBBoxForFace()cee3d1d43
Reset Skia renderer state in FPDF_DestroyLibrary()f5b07c8d3
Add test to show FPDF_DestroyLibrary() didn't reset the default renderer334a9cafa
Clarify what the "default" renderer is in CFX_DefaultRenderDevicedfef6a919
Use aggregate initialization in EmbedderTestEnvironment::SetUp()b9e0f72fd
Touchup related to C++20b8dad8f0d
Ensure several bNamed variables are bools or rename.96eb343c7
Remove unused CPDF_SecurityHandler::OnCreate() overload9c8a2c8e2
Remove GN files used to standalone C++17 builds.f9d7f6124
Make CFX_FillRenderOptions an aggregate.4b58f5d42
Sync SkPdfiumUserConfig.h with the Chromium equivalentd3d4933dd
Roll third_party/skia/ d8ec08c6d..e8c78601e (289 commits)8fccb5e2d
Fix some nits in CFX_SkiaDeviceDriver text drawing code.d57b905e0
Skia: Enable fallback code in CFX_GlyphCache::GetDeviceCache() for macOS4aa834065
Roll Zlib from fef58692c1d7 to dfc48fc4de8e (2 revisions)c00b15305
Use default member initializers in CFX_FillRenderOptions52fb05aea
Unsuppress annotation_highlight_opacity.pdf for Windows GDI55fa8edac
Sync Skia build config with Chromium's for Windows buildsbe902d2e5
Merge duplicate CPDF_CrossRefTable creation code28a72eec4
Sync Skia build config with Chromium's for Mac buildseb5100f7f
Implement FPDF_StructElement_GetChildMarkedContentID3ba54a7db
Add a test case for PDF edits not being parsed correctlye3109704c
Skia: Add some FreeType defines8d7ab32f5
Skia: Disable legacy APIs0bb4790a4
Switch to C++20 by default9fe31f6f5
Rewrite some pdfium::span usage703eb42ed
Update reclient version to re_client_version:0.116.1.9128bc4-gomaipf51bfc7f6
Roll v8/ 3eb7d73cb..1fb69d9f5 (215 commits)a58f07fe8
Remove NOTREACHED() in core/fxcrt/css- [
9217138bd
](https://pdfium...
4.22.0
Changes (Release 4.22.0)
Summary (pypdfium2)
- Changed
PDFIUM_PLATFORM=none
to strictly exclude all data files. Added new targetsystem
consuming bindings and version files supplied by the caller. Again, the setup API implications were accepted. Packagers that usednone
to bind to system pdfium will have to update. - Enhanced integration of separate modules. This blazes the trail for conda packaging. We had to move metadata back to
setup.cfg
since we need a dynamic project name, whichpyproject.toml
does not support. - Major improvements to version integration.
- Ship version info as JSON files, separately for each submodule. Expose as immutable classes. Legacy members have been retained for backwards compatibility.
- Autorelease uses dedicated JSON files for state tracking and control.
- Read version info from
git describe
, providing definite identification. - If a local git repo is not available or
git describe
failed (e.g. sdist or shallow checkout), fall back to a supplied version file or the autorelease record. However, you are strongly encouraged to provide a setup that works withgit describe
where possible.
- Added musllinux aarch64 wheel. Thanks to
@jerbob92
.
pypdfium2 commit log
PDFium commit log
Commits between 6056
and 6070
(latest commit first):
7ea179817
Remove an alias in enum CPDF_CrossRefTable::ObjectType127eed924
Demonstrate a WAI FPDFPage_RemoveObject() failure casee6ae00084
Change UnicodesForPredefinedCharSet() to return a span4fbc06ab7
Replace fxcrt::SmallBuffer with absl::InlinedVector0575de1b7
Use more WideStringViews in cfxjse_formcalc_context utility functions6943be26e
Disentangle pdfium::span<> from unowned_ptr<>.6fc5cf499
Remove NoDestructor usage in CPDF_StreamContentParser8cfb59aa3
Upgrade libtiff from 4.5.1 to 4.6.04bbfbecec
Mark 2 libtiff CVEs as mitigatedcdc2dda5a
Remove the ability to instantiate CPDF_PageModule21b96ced8
Remove CPDF_PageModule::ClearStockFont()7c6c8fffb
Move stock colorspace management out of CPDF_PageModule69db74fd3
Remove reference to ProbeForLowSeverityLifetimeIssue()9ac21c8d5
Update header comment for unowned_ptr.h85bb72cc1
Roll Memory Tools from 68be21429138 to 8b06a5370188 (1 revision)