Skip to content

Releases: pypdfium2-team/pypdfium2

4.30.0

09 May 18:33
Compare
Choose a tag to compare

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 the extract-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 before len(pdf).
  • Made get_text_range() allocation adapt to pdfium version, as FPDFText_GetText() has been reverted to UCS-2. (See v4.28 changelog for background.)
  • Updated workflows to include both macos-13 and macos-14 in test matrices because v13 is Intel and v14 ARM64 on GH actions. Removed python 3.7 testing because not supported anymore on macos-14 runners.
pypdfium2 commit log

Commits between 4.29.0 and 4.30.0 (latest commit first):

  • 6bf53c4 [autorelease main] update 4.30.0
  • 1e9e100 Add changelog entry for workflows
  • 5ad40ab Test both macOS ARM64 and Intel in all workflows
  • 600d36c Try to fix main workflow (GH arch change in macOS-latest)
  • a057218 Add changelog for backports
  • 653c38c textpage: update docs
  • 2577f5b [BP] CLI/render: fix XFA document length recognition
  • eded6c2 get_text_range(): adapt allocation to pdfium version
  • 7ce4d31 PdfImage.extract(): fix for filenames containing non-extension dot
  • 5dc2eee issue templates: reorder commands
  • 493742d Make issue templates slightly nicer
  • 391575a 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 regression
  • 01ea79cec Update hooks for reclient
  • 95b1aabea Add one more pixel test for an edited PDF that regressed
  • aaf2cc937 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 f284b6b47039a2d7edfcbfc51f52664f82b5a789
  • fa8edc249 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-gomaip
  • 8342a586d Use spancpy() in more places
  • 02ff1756c Fix yet another edited PDF that regressed
  • 7d687a0a3 Introduce {Byte,Wide}String::span_with_terminator().
  • 64447358e Mark fx_memcpy_wrappers.h functions UNSAFE_BUFFER_USAGE.
  • 7cf8895f6 Enable fuzzing with Skia enabled
  • 155028a48 Add yet another pixel test for an edited PDF that regressed
  • ff78e42df 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.cpp
  • fde20e170 Deduplicate code in CPDF_Parser and rename some methods
  • 763c169be Fix parsing of PDFs with multiple cross reference streams
  • bc759a2ae Add another pixel test for an edited PDF that regressed
  • 2c66e07e9 Spanify CFX_SeekableStreamProxy
  • d6a4b27d8 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 repo
  • 0e4ff8cd8 Roll Zlib from c5bf1b566e5d to d076d8bd0898 (6 revisions)
  • [5a49e751e](https://pdfium.google...
Read more

4.29.0

10 Apr 04:21
Compare
Choose a tag to compare

Changes (Release 4.29.0)

Summary (pypdfium2)

pypdfium2 commit log

Commits between 4.28.0 and 4.29.0 (latest commit first):

  • 66cfaa0 [autorelease main] update 4.29.0
  • b1361a7 sourcebuild: generally opt out of PartitionAlloc
  • ec5b497 docs: improve python_api preface
  • a8d8c0a update refbindings (path stripping fix)
PDFium commit log

Commits between 6337 and 6406 (latest commit first):

  • b756612c7 Use the new v8 interceptor API
  • afc399ff5 Roll v8/ fe4ad3b98..f6f7c6822 (302 commits)
  • 6af6c6197 Fix unsafe pointer usage in CJX_HostPseudoModel
  • b9ebffc36 Fix typo in {Byte,Wide}StringView.TrimmedRight tests
  • 567dff87b 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 tree
  • e4cebef61 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-gomaip
  • 9dfab8917 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_RGB
  • 0095eef10 Improve comments and naming in calculate_pitch.h
  • d43b6ce46 Update gn_version to 93ee9b91423c1f1f53fb5f6cba7b8eef6247a564
  • 8ba296abd 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_RGB
  • ffbbea8d3 Add struct FX_RGB
  • 2238fbe1b 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 save
  • fb8abcb82 Enforce checking the return value of CFX_DIBitmap::Create()
  • 8111f8946 Put unsafe buffer configuration into PDFium
  • fe581ab87 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 array
  • 1f9ae706c 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 dependency
  • 27062af25 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.py
  • adc1b16a3 Set a default GN enable_safe_libstdcxx value
  • 2f6cef867 Avoid a compiler compatibility issue with CPDF_DefaultAppearance
  • e15b92e44 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 methods
  • 7063716b1 Avoid calls to c_str() in cpdf_filespec.cpp.
  • c9f2bf183 Avoid duplicate checks in StringViewTemplate<>::Substr().
  • 70e774a94 Remove dead code in RenderPageImpl() callees
  • b039c387e Improve generated content stream data in cpdf_generateap.cpp
  • b119e4ac5 Make FPDFAnnotEmbedderTest.Bug1206 resiliant to changes
  • 1eac2c692 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...
Read more

4.28.0

10 Mar 04:24
Compare
Choose a tag to compare

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 use get_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.0
  • 8f6ecb0 readme/caller-datafiles: update ctypesgen command
  • 02cd006 Reduce some RST indents from 4 to 3
  • cd770e6 Add ability to force get_text_range()
  • 8daf76b textpage: fix up some typos
  • 380f30f Changelog for #298
  • 47a2b81 Possible workaround against #298 / pdfium bug 2133 (#301)
  • 26e7f60 readme: slightly rephrase
  • 2f297a5 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 objects
  • f19f46647 Fix wrong matrix outputs in CPDF_PageContentGenerator for text objects
  • 081e8bb68 Fix incorrect current transformation matrix when saving PDFs
  • 28483abbe Add path objects tests for a PDF saving bug
  • 78e300622 Change GetColor() to WriteColorToStream()
  • be20f54f3 Update UNSAFE_BUFFER macros to match chromium/src/base
  • 71e2229aa Add text object version of a more complex test for a PDF saving bug
  • ff374196e 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_PageContentGenerator
  • 8ebeb124b Fix building with GCC
  • 504ae0c73 Fix nits in CPDF_PageContentGeneratorTest
  • 3055d3857 Make CFX_RenderDevice::GetDIBits() take RetainPtrs by value
  • 36cd3f41e Rename some colorspace methods
  • ac728e5cb Rename CPDF_ICCBasedCS member variables
  • 8fa6a324c Roll third_party/zlib/ 646b7f569..3787595bb (4 commits)
  • 03e96fc9d Remove the matrix from CPDF_GeneralState
  • 624807fbd 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_PageContentGenerator
  • 074387f08 Add a more complex test for a PDF saving bug
  • 88eff81cc Add a test case for a PDF saving bug
  • 314d76477 Simplify PDF_EncodeText() using FX_UTF16Encode()
  • af1239af6 Make CPDF_IccProfile's dependency more direct
  • 3771a29b4 Remove CFX_Font::IsEmbedded()
  • 050ae79e8 Stop making CPDF_IccProfile an Observable
  • 038d39b31 Avoid more future unsafe buffer usage in StringDataTemplate.
  • 9108588e6 Move remaining code out of third_party/base and into core/fxcrt
  • b8ea87677 Remove remaining NoDestructor usage
  • 01e6d560e Convert some C-style arrays to std::array<>.
  • a7fca8a4f Add a way to undo a previous FPDF_SetSystemFontInfo() call
  • b4fb36188 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/fxcrt
  • 34e34057a Merge third_party/base/memory/aligned_memory.h into fx_memory.h
  • ee6325efe Move third_party/base/t...
Read more

4.27.0

10 Feb 04:22
Compare
Choose a tag to compare

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 of pypdfium2-team/ctypesgen at the time of the build to reproduce. Alternatively, you may patch the relevant pyproject.toml entry yourself and use PDFIUM_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.0
  • 2d165af readme: remove outdated helper
  • 112fb34 Readme: mention prominent embedders
  • b0352a1 Correctly reland commit 0d1cc21
  • 34b356b Revert "Bump setup-miniconda 2->3 & {upload,download}-artifact 3->4"
  • 137b71a Add dependabot to changelog
  • ed32d64 dependabot: ignore broken workflow-dispatch 121
  • d94ee90 build(deps): bump actions/setup-python from 4 to 5
  • ca59682 build(deps): bump actions/upload-pages-artifact from 1 to 3
  • 00556fe Bump deploy-pages from 1 to 4 (closes #294)
  • 21ca95b Create dependabot.yml for GH actions
  • 0d1cc21 Bump setup-miniconda 2->3 & {upload,download}-artifact 3->4
  • 9cb5c38 Remove some legacy code for conda_raw
  • a584927 misc improvements
  • 0324787 workflows/test_sourcebuild: check version
  • 9289258 workflows/test_sourcebuild: fix typo
  • 3b4ef4b Try to fix sourcebuild
  • 2e84994 autorelease: remove excessive note/todo/fixme marks
  • a8c3cd3 Remove git status assert
  • bb68b1a dirty: pass through previous state via env var
  • db4ebbb Add some checks before ignoring dirty state
  • 4558229 ctypesgen: allow passing in custom pre-processor
  • 7248bc4 build: call into API directly
  • fab4102 Avoid odd use of any() where or does the trick
  • d968173 readme/PDFIUM_PLATFORM: account for none -> sdist renaming
  • a2d66dd Update changelog
  • 71b7a20 craft_packages/pypi: allow building sdist/wheels only
  • 629bb97 craft_packages: make ctypesgen pin configurable
  • af5216b slightly polish manifest / setup.cfg
  • ebc8715 Bump copyright year
  • 24d438f fix license of ./run script
  • 3e93f56 Amend changelog
  • c72b7a9 Revert "temporarily comment out testpypi upload"
PDFium commit log

Commits between 6233 and 6281 (latest commit first):

  • 7c7a6087e Add FPDFText_LoadCidType2Font() API
  • 41015d113 Encapsulate FT_Get_Glyph_Name() calls in CFX_Face
  • 4d00d9737 Fix another typo in ToUnicode template constant
  • f22325c95 Make PDF_USE_SKIA a public build definition
  • ccc38c258 Remove more dead code in CFX_DIBitmap
  • 8abe178b4 Clean up CPDF_RenderStatus::LoadSMask()
  • fe586ee39 Remove dead code in CFX_DIBitmap
  • e24607c76 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} methods
  • 6f3cf81a8 Change MultiplyAlphaMask() to take a CFX_DIBitmap
  • 82f4360b8 Consolidate code into CPDF_ImageRenderer::CalculateDrawImage()
  • cbf5da504 Refactor LoadCompositeFont() to extract useful helper functions
  • a88402105 Check for errors first in LoadSimpleFont() and LoadCompositeFont()
  • e06220af3 Rename many variables inside fpdf_edittext.cpp
  • 7666160f5 Fix various nits inside fpdf_edittext.cpp (for reals)
  • f689b6a68 Fix various nits inside fpdf_edittext.cpp
  • d617c4e8b Update readme for Reclient instead of Goma
  • 32c29e431 Encapsulate more bounding box code in CFX_Face
  • 3f7847662 Move NormalizeFontMetric() out of CPDF_Font
  • a0fd10adf Rewrite and rename CPDF_Font::TT2PDF()
  • 4be416d76 Give variables better names in CPDF_ImageRenderer
  • 54f25ce7a Ensure CPDF_Stream always has a dictionary
  • 720ffea6a Fix typo in ToUnicode template constant
  • 8acd78867 Remove the ability to create an u...
Read more

4.26.0

10 Jan 16:57
Compare
Choose a tag to compare

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.0
  • 8f45f33 temporarily comment out testpypi upload
  • d11ed9f Add changelog regarding sdist
  • 7aba111 Presumably fix PyPI upload of sdist (ignore dirty)
  • 1e7536f Add back manylinux2014 to be on the safe side
  • b774be5 some cleanups
  • 2eb90a2 Slightly improve PR template
  • a1a1d37 conda_helpers: blacklist pdfium 6219
  • a521a6e readme: move down conda
  • ba2db80 setup/bindings: fix flags not being passed through
  • cf256ee Adapt to change in pdfium headers
  • 6ef3b44 add back srcinfo to bindings file
  • 0db98b4 Mark regex as such
  • a9d6dfc Adapt to c_void_p -> int auto-cast
  • 47857b6 sdist: implement ctypesgen pin
  • 7e90ecd Call into ctypesgen API directly
  • 51612d3 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 dependency
  • f6d55c802 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 buffer
  • 950682b99 Use std::vector<> in testing/test_fonts.h
  • 43f921adf Roll v8/ 3469157c0..fc242dcac (66 commits)
  • 143c5b262 Update reclient_version to 0.125.0.f3883c2-gomaip
  • fbd64b666 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 tests
  • 4821f9fb8 Update android_toolchain_version to wpJvg81kuXdMM66r_l9Doa-pLfR6S26Jd1x40LpwWEoC
  • 62938cd83 Update gn_version to 85944ebc24a90ec1e489e85a46fdc68542c3146f
  • a03eebd66 Add missing FontEncoding::kNone value
  • 8810061a8 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 transparencies
  • 899ff64f2 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_Encoding
  • 7b129a284 Encapsulate FT_Get_First_Char() and FT_Get_Next_Char()
  • 704cc481c Fix regression where FPDFText_FindNext() cannot find the search term
  • 471679d54 Use the dedicated ConfigurePartitionsForTesting()
  • 3e624ce0f Roll base/allocator/partition_allocator/ e9591a3fa..82380dc78 (24 commits)
  • 9f94a1a4a Add more FPDFTextEmbedderTests for finding text
  • 45a5ea16c Add FPDFTextEmbedderTest case to show FPDFText_FindNext() regressed
  • 3f3cb7b65 Validate width against stride in CFX_DIBitmap::CalculatePitchAndSize().
  • 24a713a85 Remove CPDF_CrossRefTable::ObjectType::kObjStream
  • 57e284ba2 Roll Zlib from 5daffc716bb6 to 562a4372d176 (12 revisions)
  • a2c91f07a Encapsulate FT_Get_Sfnt_Table() calls
  • 2708849c4 Encapsulate FT_Load_Sfnt_Table() calls
  • 592da1277 Encapsulate FT_Get_Char_Index() and FT_Get_Name_Index() calls
  • 7f50e6e23 Encapsulate font charmap code inside CFX_Face
  • a9d080a7f Deduplicate constants / macros between cfx_face.cpp and cfx_font.cpp
  • 4870bd3e2 Move some FreeType-specific code from CFX_Font to CFX_Face
  • bd3e9f3d9 Remove unused CFPF_SkiaFont code
  • 65dc04dda Move CFX_GlyphBitmap creation code into CFX_Face::RenderGlyph()
  • 4f26084fa Remove spurious fx_freetype.h includes
  • [b2d4f1104](https:/...
Read more

4.25.0

10 Dec 04:23
Compare
Choose a tag to compare

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 with os.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.
  • 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.0
  • 6f5df31 workflows/main: minor comments cleanup
  • 4c0aee6 conda: get rid of effectively dead bundling code
  • 816f421 craft_packages: cut overly extensive comments
  • d140de2 Handle latest version separately for conda pdfium/pypdfium2_raw
  • 63a17ba conda: sync pypdfium2_raw schedule with pdfium-binaries
  • cdb1fe4 instruct ctypesgen to exclude some garbage symbols
  • adf89b0 docs correction
  • afc4740 reinstall schedule
  • 6024f15 Make document-level renderer harmless by linearization (#282)
  • 7c53bd1 temporarily inhibit schedule
  • 0fe8578 ctypesgen: add --no-macro-guards
  • 8f0a425 readme: update ABI bindings section
  • 6a0a67b get_text_range: slightly enhance docs
  • 5886522 improve changelog/template, add tasks
  • acd1719 conda/recipes: do not wrap env vars in quotes after all
  • f3cc2dd continue on refbindings
  • 0822682 continue on PR template (setup)
  • e26b24d Prepare changelog
  • f93532d setup: avoid explicit mention of clang
  • ad56b56 docs: continue on conda
  • 54d2ffc craft/conda: update a code comment
  • 59dc178 issue-templates: rename "package" to "install" in titles
  • 9a1dcd3 Inline build version handling in craft_packages
  • 3b418eb conda_raw: handle rebuilds (#280)
  • ecb77d2 Add skia to refbindings flags (+ thoughts on external headers)
  • 01727fc setup-miniconda: correct channel prio
  • a5f2c5b PR template nits
  • 100d7e4 Tighten issue template descriptions
  • ddc8abc refbindings: define feature flags
  • 136a655 setup: fix blunder in headers cache logic
  • 67de448 Continue on PR template
  • a1037a3 Add draft pull request template
  • 9f54a76 issue template generic: clarify checkbox 2 (CC #277)
  • c5c558a Add note on version info
  • 8b454c0 nits
  • 24839ea conda: slightly improve script and recipes
  • 9e73c75 wf/conda: try to make sure we install the built package
  • 8a438f8 readme: conda section again
  • 2fbac25 workflows/conda: remove a redundant layer of channels
  • c6dd1d1 readme: rework conda section again
  • 28649ad issues/conda: check python executable
  • 07d336e readme: revise conda instructions
  • 45e8f0c cli/version: show only libpath rather than whole loader info
  • 81f24de dep5-wheel: add helpers version file
  • 09d194f manifest: fix missing reuse/dep5 include blunder
  • 1cf9442 req: sunset defaults.txt
  • d95efed req: test implies converters
  • [9e29101](https://github.com/pypdfium2-team/pyp...
Read more

4.24.0

10 Nov 18:19
Compare
Choose a tag to compare

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 file
  • c49dcca temporarily comment out testpypi upload
  • a222c06 Fix sdist package getting wrong name
  • 1b0a5c6 slightly polish previous commit
  • abd8a4f sourcebuild: actually fix version (closes #276)
  • 13ae34b Fix generic issue template style
  • e10f667 Revert "sourcebuild: try to fix version..."
  • 01c2355 sourcebuild: try to fix version...
  • 4f2d3cc sourcebuild: add fixme regarding version
  • 923e258 sourcebuild: build config corrections
  • a7e5aa3 readme/install-system-caller: revise origin again
  • 51da8a6 workflows/trigger: temporarily comment out main schedule
  • 7d31730 setup nits/comments
  • 9ca64b9 readme/install-source-caller: change origin format
  • 51dab26 readme/issues: continue
  • 286294b readme: add anchor icons to links
  • d7ef006 Add draft instructions to build with caller-provided files
  • 798b02b sourcebuild: comment out use_custom_libcxx
  • a308025 to_full(): use namedtuple, improve sourcebuild version style
  • 46e81b1 emplace: add back prettier repr
  • d23b9f8 issue template nits
  • ddab675 Revert "Make conda and prepared detectable"
  • 063e4ec Make conda and prepared detectable
  • f04f757 readme: try to make install sections linkable without heading
  • 04c095d Continue on issue templates
  • 44946e2 Add comment regarding to_full()
  • a4fc943 bindings cache: take guard_symbols into account
  • 3f3dd40 emplace: improve prints
  • 6d860a4 emplace/bindings: use cached headers if available
  • be2e25d emplace: use binary cache if only bindings are missing
  • 8a33235 refbindings: allow system library loading
  • df54e88 update_pdfium: fix descriptions (CC #272)
  • a397ff7 templates/conda: add call to conda config --get
  • 39e12e0 ctypesgen: add --no-system-libsearch if --runtime-libdirs given
  • 0dd8e34 Improve issue templates
  • db1e956 Add basic issue templates (#271)
  • a5454bf Minor style improvements
  • 3aa6c15 slightly reorder conda instructions (install line first)
  • 5fb49a5 Simplify conda instructions
  • 341c360 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 CGdiplusExt
  • 90589d465 Replace const-ref std::vector arguments with pdfium::span in fxjs.
  • fc412acd0 Revert recent C++20 usage in CFX_FillRenderOptions
  • 03c04196f Remove unnecessary LoadLibrary() call in CGdiplusExt
  • fdb409aaf Roll third_party/freetype/src/ 7b308a29d..55d0287cf (17 commits)
  • 9091e26f4 Add a test for rendering a transparency onto a white background
  • 647a08001 Add support for the Rust toolchain
  • 9cb2d6887 Update gn_version to e4702d7409069c4f12d45ea7b7f0890717ca3f4b
  • e5f05d9c6 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 build
  • a3895af47 Roll Catapult from 4f81c1e29597 to 47efdb4b1428 (70 revisions)

4.23.1

31 Oct 20:19
Compare
Choose a tag to compare

Changes (Release 4.23.1)

Summary (pypdfium2)

  • Fixed (Test)PyPI upload.
pypdfium2 commit log

Commits between 4.23.0 and 4.23.1 (latest commit first):

  • b1c62f3 [autorelease] update changelog and version file
  • 69f8d76 Prepare new release
  • ec280df update changelog
  • 779872d Swap GH and PyPI publishing

4.23.0

31 Oct 19:29
Compare
Choose a tag to compare
4.23.0 Pre-release
Pre-release

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 file
  • 3461c41 ci: fix trigger_main
  • 5f136b6 conda: fix test run on windows
  • 28b3b8c update changelog_staging
  • 0ce8207 workflow: add task
  • 7431eca Merge pull request #269 from pypdfium2-team/conda_ci
  • 5227e2b unlock anaconda upload
  • 6bb7b6e Conda CI
  • 1565920 Ask third party packagers to mark unofficial builds as such
  • 1b20e4f conda: use consistent org name
  • c2e9bd1 fix typo in changelog
  • 645d407 readme nit
  • ee5a2ff Conda packaging code (#268)
  • 844879a readme: fix typo
  • d4fd2e4 craft_packages: correct artifact count check
  • 1fa40b8 nit: fix another comment
  • c80ab06 reuse: improve formatting consistency
  • 7f61905 nit: fix some license related comments
  • 92fa3da Add option to use reference bindings
  • b6141e7 misc style improvements
  • 7b08870 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.cpp
  • 5956b29a9 Remove NoDestructor usage in timer classes
  • 6b79c5102 Remove NoDestructor usage in progressive image decoders
  • 7e26566ee Switch to NOTREACHED_NORETURN() in a couple more files
  • 12eaa1a83 Remove superfluous base/numerics includes
  • d36d5ab4c 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 renderer
  • 334a9cafa Clarify what the "default" renderer is in CFX_DefaultRenderDevice
  • dfef6a919 Use aggregate initialization in EmbedderTestEnvironment::SetUp()
  • b9e0f72fd Touchup related to C++20
  • b8dad8f0d Ensure several bNamed variables are bools or rename.
  • 96eb343c7 Remove unused CPDF_SecurityHandler::OnCreate() overload
  • 9c8a2c8e2 Remove GN files used to standalone C++17 builds.
  • f9d7f6124 Make CFX_FillRenderOptions an aggregate.
  • 4b58f5d42 Sync SkPdfiumUserConfig.h with the Chromium equivalent
  • d3d4933dd 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 macOS
  • 4aa834065 Roll Zlib from fef58692c1d7 to dfc48fc4de8e (2 revisions)
  • c00b15305 Use default member initializers in CFX_FillRenderOptions
  • 52fb05aea Unsuppress annotation_highlight_opacity.pdf for Windows GDI
  • 55fa8edac Sync Skia build config with Chromium's for Windows builds
  • be902d2e5 Merge duplicate CPDF_CrossRefTable creation code
  • 28a72eec4 Sync Skia build config with Chromium's for Mac builds
  • eb5100f7f Implement FPDF_StructElement_GetChildMarkedContentID
  • 3ba54a7db Add a test case for PDF edits not being parsed correctly
  • e3109704c Skia: Add some FreeType defines
  • 8d7ab32f5 Skia: Disable legacy APIs
  • 0bb4790a4 Switch to C++20 by default
  • 9fe31f6f5 Rewrite some pdfium::span usage
  • 703eb42ed Update reclient version to re_client_version:0.116.1.9128bc4-gomaip
  • f51bfc7f6 Roll v8/ 3eb7d73cb..1fb69d9f5 (215 commits)
  • a58f07fe8 Remove NOTREACHED() in core/fxcrt/css
  • [9217138bd](https://pdfium...
Read more

4.22.0

19 Oct 15:26
Compare
Choose a tag to compare

Changes (Release 4.22.0)

Summary (pypdfium2)

  • Changed PDFIUM_PLATFORM=none to strictly exclude all data files. Added new target system consuming bindings and version files supplied by the caller. Again, the setup API implications were accepted. Packagers that used none 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, which pyproject.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 with git describe where possible.
  • Added musllinux aarch64 wheel. Thanks to @jerbob92.
pypdfium2 commit log

Commits between 4.21.0 and 4.22.0 (latest commit first):

  • 9c5f0ba [autorelease] update changelog and version file
  • f285ca2 changelog formatting nits
  • 08577f7 Restore autorelease schedule
  • 30c2373 Improve version integration (#263)
  • 3100bfe Never spawn more processes than we have pages
  • 3be189f Grant permission for GH pages dispatch (supposedly fixes #265)
PDFium commit log

Commits between 6056 and 6070 (latest commit first):

  • 7ea179817 Remove an alias in enum CPDF_CrossRefTable::ObjectType
  • 127eed924 Demonstrate a WAI FPDFPage_RemoveObject() failure case
  • e6ae00084 Change UnicodesForPredefinedCharSet() to return a span
  • 4fbc06ab7 Replace fxcrt::SmallBuffer with absl::InlinedVector
  • 0575de1b7 Use more WideStringViews in cfxjse_formcalc_context utility functions
  • 6943be26e Disentangle pdfium::span<> from unowned_ptr<>.
  • 6fc5cf499 Remove NoDestructor usage in CPDF_StreamContentParser
  • 8cfb59aa3 Upgrade libtiff from 4.5.1 to 4.6.0
  • 4bbfbecec Mark 2 libtiff CVEs as mitigated
  • cdc2dda5a Remove the ability to instantiate CPDF_PageModule
  • 21b96ced8 Remove CPDF_PageModule::ClearStockFont()
  • 7c6c8fffb Move stock colorspace management out of CPDF_PageModule
  • 69db74fd3 Remove reference to ProbeForLowSeverityLifetimeIssue()
  • 9ac21c8d5 Update header comment for unowned_ptr.h
  • 85bb72cc1 Roll Memory Tools from 68be21429138 to 8b06a5370188 (1 revision)