Pypdfium2 Versions Save

Python bindings to PDFium

4.30.0

3 weeks ago

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 Roll build/ e5ff2eff3..e4eef53d5 (27 commits)
  • 059201ee5 Fix unsafe buffer usage in fxbarcode/datamatrix.
  • d3c008e60 Avoid some two-arg make_span() calls via extern spans.
  • 666c400d4 Fix unsafe buffer usage in (non-XFA) JS bindings.
  • b079e8738 Fix some unsafe usage in cpdfdsk_{helpers,interactiveform}.cpp
  • c658519d7 Roll v8/ f6f7c6822..7f0739496 (162 commits)

4.29.0

1 month ago

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 Add script to fetch images from pdfium-skia gold server
  • cd894790e Change scripts to use autoninja
  • 984472732 Roll third_party/skia/ 532505396..32f1cb507 (200 commits)
  • adc3fe713 Increase internal precision in FXSYS_wcstof().
  • 112c347ce Generate more legal content stream data in CPDF_GenerateAP
  • 91bf0897d Roll build, clang, and rust tools
  • 27499934d Properly account for CTM changes
  • bbf4c534e Remove unreachable TranslateImageLine() colorspace code
  • 62e50f0cc Roll abseil, buildtools, and libc++
  • f9629a34a Rename CPDF_Color::GetRGB() to GetColorRef()
  • 8fc2c9efb Rename CPDF_PatternCS::GetPatternRGB() to GetPatternColorRef()
  • 6fa344b5e Roll third_party/googletest/src/ af29db7ec..e4fdb87e7 (411 commits)
  • 91e017d16 Demonstrate PDF saving bug with a "leaky" CTM
  • 1655bca8e Roll base/allocator/partition_allocator/ c2bb1848e..c702699cc (26 commits)
  • 42e91338b Roll Zlib from 3787595bbbd3 to c5bf1b566e5d (4 revisions)
  • 8063a85e1 Roll Memory Tools from 4753a8cbcd7c to c6d669e13804 (2 revisions)
  • bfa3a7cf2 Gate GDI APIs behind IsUser32AndGdi32Available in cfgas_fontmgr.cpp
  • 0e97af8ad Roll abseil, build, buildtools, clang, and partition_allocator
  • 4b608cc69 Roll base/allocator/partition_allocator/ 42bf756b3..dd11a7511 (19 commits)
  • 95339d668 Roll gn from a2e2717ea670 to 88e8054aff7b
  • 149948491 Roll buildtools, libc++, and abseil
  • c065a7bcc Fix cut/paste error in fx_extension_unittest.cpp
  • 71bd32dce Generate more modern V8 API calls in js_define.h macros
  • a00152123 Remove FXSYS_wcsnicmp() and its unsafe buffer usage.
  • 010181205 Roll build/ 386c65667..3aeefdc1a (30 commits)
  • f67f17d4e Roll tools/clang/ ff84dc245..44c10e414 (8 commits)
  • 6481391a4 Roll third_party/libc++abi/src/ 0c4e8fac5..fc6253a64 (6 commits)
  • 8a8ec92da Make core/fxcrt/css compile under nounsafe_buffer_usage.
  • 17c556ac5 Long overdue update of string types in CSS.
  • c084b5c31 Optimize CFX_FolderFontInfo::FindFont() for an exact match case.
  • 3ec142417 Roll third_party/freetype/src/ 47574f7ea..2a790a9f4 (2 commits)
  • 0ac7aec0b Downgrade raw_span<> to span<> in StringViewTemplate.
  • 7662a3e82 Split implementations of raw_span from span.
  • 4b2d2b31e Roll third_party/icu/ a622de35a..1112fa6b3 (5 commits)
  • 0831fb85b Update span<> to raw_span<> when used as a class member.
  • 9c2baafeb Make pdfium::span<> templated on Extent and InternalPtrType.
  • ed10b5fef Roll v8/ a86e19715..fe4ad3b98 (253 commits)
  • 85983f43c Add CPDF_ColorSpace::GetColorRef()
  • 26046f36c Add a pixel test with a sRGB colorspace and a large sc operand value
  • a22f600ba Roll Depot Tools from af6eabff5313 to fbb0301f1f70 (66 revisions)
  • d6efd7aa0 Roll Code Coverage from 76f45e718405 to 10ce382356ce (4 revisions)

4.28.0

2 months ago

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/test/scoped_locale.* to testing
  • 81b3f39ed Move third_party/base/{debug,win} to core/fxcrt
  • e89957979 Convert CFX_XMLParser::current_text_ to WideString
  • f36006cdf Move third_party/base/numerics to core/fxcrt/numerics
  • d4c0790fe Rename TrimLeft()/TrimRight() to TrimFront()/TrimBack().
  • 1908cfc53 add file annot api
  • f778d3c42 Move third_party/base/containers/*.h to core/fxcrt/containers
  • 86aa2fb2e Move {Byte,Wide}String::Trim{,Left,Right}() into StringTemplate<>
  • ba6031ad9 Force LF line ending for the AUTHORS file
  • 67963ba70 Remove Fuchsia support
  • a426b95b7 Fix typo in public/fpdf_sysfontinfo.h
  • 812acaddb Disallow absl::optional usage via include_rules
  • 05f42a1cc Enforce checkdeps when submitting CLs
  • 1d732b2aa Fix include rules in cfx_glyphcache.cpp
  • 37935952b Move third_party/base/span.h to core/fxcrt
  • 7a3e5c034 Move {Byte,Wide}String::Replace() to StringTemplate<>
  • a6bea32c5 Get rid of FX_GET_32WORD macro.
  • dbff3cbe9 Use more spans in Revision6_Hash()
  • d4ee164ef Move {Byte,Wide}String::SetAt() into StringTemplate<>
  • 41760201f Move {Byte,Wide}String::Find() into StringTemplate<>
  • 88e1fe5c3 Remove fxcrt::ByteSwapTo* functions
  • 006476b26 Move {Byte,Wide}String::Insert() to StringTemplate<T>
  • b9bd64794 Move {Byte,Wide}String::Delete() into StringTemplate<T>.
  • 12772dac9 Consolidate byteorder code
  • 2edcdd72f Fix use-after-move in CPDF_RenderStatus::CompositeDIBitmap()
  • 549afab11 Convert fx_random.cpp to use safe types
  • aecfce306 Use std::array<> in fx_coordinates.cpp.
  • e0742615a Add missing includes uncovered by libc++ change
  • ca0dc045d Roll third_party/skia/ a9db1213b..6279c88b9 (349 commits)
  • a747ba711 Roll build/ 9ca0d2ce9..386c65667 (118 commits)
  • f283eab76 Add UNSAFE_BUFFER annotations to fx_dib.h
  • 4ccd18a00 Move even more code still into StringTemplate.
  • 5488b8f20 Get rid of pointer arithmetic in *MSBFIRST() and *LSBFIRST() macros.
  • b031c22a8 Give better error diagnostic in cpdf_dictionary.h
  • df0228d9b Put GetBuffer() and ReleaseBuffer() in StringBaseTemplate
  • 64571d5d1 Avoid adding stream objects directly to arrays in CPDF_SyntaxParser
  • 88b642dd8 Roll tools/clang/ 2b9d966ec..ff84dc245 (41 commits)
  • 457ff0f6e Place common code for byte/wide strings in StringTemplate.
  • 4306e55b5 Combine FX_wcspos() and FX_strpos() into fxcrt::spanpos().
  • 5299db5f1 Encapsulate FT_Set_Pixel_Sizes()
  • 56f5c3b67 Roll Zlib from 956936c53cb6 to 646b7f569718 (3 revisions)
  • aad37f1a2 Move WideString::WStringLength() to cpdfsdk_helpers.cpp
  • c3bf5b2ae Add runtime check for streams in CPDF_Array::SetAtInternal() and friends
  • 778a2f631 Do not let CPDF_Array::SetNewAt() and friends take a CPDF_Stream
  • ba0b98cbc Make RenderDeviceDriverIface::SetDIBits() take RetainPtrs by value
  • 9dfb129b5 Return RetainPtr<> from StringData::Create()
  • c764fe091 Avoid UNSAFE_BUFFER operations in core/fxcrt/{byte,wide}string.h
  • 467e8dde5 Remove ByteString::AllocCopy() and WideString::AllocCopy().
  • bb51448d6 Ensure CPDF_Stream's dictionary is always a direct object
  • 4fbdcdcbf Give "V4" and "V5" parser code better names
  • 244491fa8 Mark CVE-2023-52355 as mitigated in third_party/libtiff/METADATA
  • d85e88249 Fix PDF loading when an initial xref stream references a xref table
  • 24c6be692 Switch from absl::optional to std::optional
  • db46cc55f Add another pixel test for incorrect cross reference stream handling
  • 907b76519 Sync Chromium's include_rules for Abseil
  • 59f3856c9 Spanify FX_strstr() and FX_wcsstr()
  • 35d21add5 Avoid potential msan warnings in test SpanEquals.Empty
  • 4097f1d49 Add new base::span<> functions to pdfium::span<>.
  • 0a15a0573 Roll buildtools/, third_party/libc++/src/, third_party/libc++abi/src/
  • 2f1b073ae Add improvements to core/fxcrt/span_util.h
  • 03a847d67 Tidy some code in fx_crypt_aes.cpp
  • 187fa9288 Introduce UNSAFE_BUFFERS() macro to PDFium.
  • 4282836f3 Roll Depot Tools from 35a530663508 to af6eabff5313 (49 revisions)
  • 416a9d4d5 Roll Code Coverage from 2bd00824f032 to 76f45e718405 (1 revision)
  • 4a3765ad9 Roll tools/rust/ e721a72ad..bcaf16e55 (9 commits)
  • 5d809a2bc Remove limit on number of form XObjects within a form XObject
  • 4c76a8ffe Update reclient_version to 0.130.0.546556b-gomaip
  • 8a4b1b742 Roll third_party/libunwind/src/ 2602aecdf..fc505746f (7 commits)
  • 8017ac552 Roll gn from 85944ebc24a9 to a2e2717ea670
  • c385302dc Roll third_party/abseil-cpp/ b7ad4e9ef..d391aa34a (8 commits)
  • 4048722ad Roll third_party/freetype/src/ ca76683b7..47574f7ea (10 commits)
  • 2a585a8e5 Ignore /Prev for hybrid-reference files
  • 815cc45c3 Revert ProcessCrossRefV5Entry() overwrite change
  • a8e1f1379 Add pixel test for an edited PDF that regressed

4.27.0

3 months ago

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 uninitialized CPDF_Stream
  • 88d3d5674 Simplify CPDF_Stream::InitStreamFromFile() and minimize usage
  • f21a92341 Remove CPDF_Stream::InitStreamWithEmptyData()
  • bfc71b9f8 Add more CPDF_Stream constructors
  • 4c4f9ab25 Roll v8/ 83ad2aebb..b6fd2f17b (257 commits)
  • ed6dfc4cd Do not let CPDF_Array::SetAt() and friends take a CPDF_Stream
  • 41109a4bb Add runtime check for streams in CPDF_Dictionary::SetForInternal()
  • cc81d1163 Make FixedSizeDataVector more similar to base::HeapArray.
  • 74a9b8f30 Do not let CPDF_Dictionary::SetNewFor() take a CPDF_Stream
  • 595d4fb37 Double the form XObject limit
  • 25d775f4e Import base::span_from_ref() into span.h
  • 7b9fa8a5e Simplify IsObjectStream() inside cpdf_object_stream.cpp
  • 75e77041a Do not let CPDF_Dictionary::SetFor() take a CPDF_Stream
  • 40dd82860 Introduce fxcrt::reinterpret_span<>()
  • 29ec83a0e Make CFX_RenderDevice::StretchBitMask() take RetainPtrs by value
  • a12a3ec57 Make RenderDeviceDriverIface::StretchDIBits() take RetainPtrs by value
  • 03ad3c563 Make CPDF_ToUnicodeMap::HandleBeginBFRange() faster
  • f6fc06e8e Keep ubsan ignorelist.txt to use regex
  • 2ddc2233d Roll MarkupSafe from 006709ba3ed8 to 0bad08bb207b (1 revision)
  • 945576e5b Roll Zlib from 562a4372d176 to 956936c53cb6 (4 revisions)
  • c78de6c97 Roll Jinja2 from 515dd10de9bf to e2d024354e11 (1 revision)
  • de69973b9 Add CFX_DIBBase::TakePalette()
  • 6c8ad61ca Make RenderDeviceDriverIface::StartDIBits() take RetainPtrs by value
  • 203a271b8 Handle MultiplyAlpha(1.0f) within MultiplyAlpha()
  • 9423718a7 Remove out-parameter from CFX_DIBBase::ConvertBuffer()
  • e0892d95e Make RenderDeviceDriverIface::SetBitsWithMask() bitmap params const
  • 1ee2be3c7 Remove dead code from CFX_DIBBase::ConvertBuffer() and related code
  • 281b2c413 Remove unused CFX_DIBitmap::SetPixel()
  • 0a2a8a32e Change CPDF_ImageRenderer to store a float alpha value
  • 68f94c8c4 Pass RetainPtrs in CFX_RenderDevice and CFX_DIBitmap by value
  • 8b2f58994 Change CFX_RenderDevice::StartDIBitsWithBlend() to take a float alpha
  • cdadc9032 Change CPDF_RenderStatus::CompositeDIBitmap() to take a float alpha
  • 31b7951f6 Change CFX_ImageRenderer to use float alpha values
  • 376c79ba1 Change CFX_BitmapComposer to use float alpha values
  • 2f66170bd Switch to NOTREACHED_NORETURN() in core/fxge/win32
  • 13eb23bec Make RenderDeviceDriverIface::MultiplyAlphaMask() parameter more const
  • 7a42572bb Change SetBitsWithMask() methods to take alpha as a float
  • aa332c819 Change RenderDeviceDriverIface::StartDIBits() to take alpha as a float
  • 02881c0a7 Change CFX_DIBitmap::MultiplyAlpha() to take a float
  • 111a8a2a3 Avoid overloading MultiplyAlpha()
  • 57e5c5fd3 Implement CFX_DefaultRenderDevice::Clear() for all build configs
  • 3cbf75f84 Make RenderDeviceDriverIface more const-correct
  • a1d7dbd4c Make CFX_DIBitmap more const-correct
  • 7532c21d1 Remove dead code in CFX_DefaultRenderDevice::AttachAggImpl()
  • b0a3f99a9 Make CFX_RenderDevice::GetBitmap() const-correct
  • 2b0890f3f Mark CFX_RenderDevice::SetBitmap() as protected
  • d569a5d1b Avoid FT_FaceRec usage in various places
  • 9e6c4f02f Roll Depot Tools from 1714cc6e5ae3 to 35a530663508 (41 revisions)
  • 05c3c8cc7 Roll Code Coverage from d0698ae5eae9 to 2bd00824f032 (2 revisions)

4.26.0

4 months ago

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 Add pdf_enable_fontations GN flag
  • 2cc859137 Roll v8/ e725aa2be..3469157c0 (140 commits)
  • 07b01a0f6 Encapsulate FT_Select_Charmap() inside CFX_Face
  • 69f05fecc Add enum class fxge::FontEncoding
  • b26a1101d Rename SKIA_SUPPORT to PDF_USE_SKIA
  • 79be3dc12 Roll tools/clang/ abf153714..dbe34d7b7 (21 commits)
  • c199ca664 Add flag to disable blink gc plugin check
  • dda631d81 Encapsulate font metrics code inside CFX_Face
  • 2d34bcaab Avoid out-of-bound access in CPDF_TextPageFind::FindNext()
  • c8975d2a2 Make some small refactorings in CPDF_TextPageFind::FindNext()
  • f1052595f Encapsulate font bbox code inside CFX_Face
  • 0527caf4c Encapsulate font name code inside CFX_Face
  • cf2e29e38 Encapsulate font stream code inside CFX_Face
  • f4e15e992 Encapsulate font style code inside CFX_Face
  • b70a91734 Encapsulate font flag code inside CFX_Face
  • cb1cd2f12 Convert FX_Number to absl::variant<>.
  • cb19b4be6 Remove CPDF_RenderOptions::RenderType.
  • 2c8f00392 Consistently use "page_object" in public/fpdf_edit.h
  • 76a26983e Add std::u16string FX_UTF16Encode(WideStringView)
  • ac2bc2320 Roll Depot Tools from ea9bf7f343d3 to 1714cc6e5ae3 (67 revisions)
  • b4130af2f Roll Code Coverage from 61632b07bdc6 to d0698ae5eae9 (5 revisions)
  • 423ab6b69 Tidy some CPDF_CrossRefTable:: nested class usage.
  • a211cf1c9 Add an embedder test for a FPDFText_FindNext() crash
  • 64cfae43c Return v8::Local<> from CFXJSE_RuntimeData::GetRootContext().
  • f810210f2 Roll base/allocator/partition_allocator/ 6800d0930..e9591a3fa (47 commits)
  • e6ee9ef0a Sync PartitionAlloc config with Chromium's
  • f68bb7f1c Roll v8/ a7273c4f2..e725aa2be (305 commits)
  • 630703378 Avoid some comparisons against data.size() - 1.
  • 5c8b497cd Unconditionally enable absl support in googletest
  • f8b509b20 Roll v8/ a9cdaea34..a7273c4f2 (303 commits)
  • a7a1e6a48 Switch away from deprecated v8::Object::SetAccessor() calls
  • 8361a18bb Roll third_party/freetype/src/ 028b0d5c1..8f255c89e (23 commits)
  • 706a395ce Roll third_party/freetype/src/ 6d6607b8b..028b0d5c1 (9 commits)
  • 9575d0528 Roll third_party/freetype/src/ 55d0287cf..6d6607b8b (4 commits)
  • 86f7fb747 Roll v8/ 06aba4270..a9cdaea34 (90 commits)
  • 4e1d84af4 Roll tools/rust/ c2a0e44aa..9f2ba7f84 (5 commits)
  • 6ba8a45f0 Roll third_party/libc++abi/src/ 2ca9f3871..4cb5c2cef (14 commits)
  • a8948f9f0 Roll third_party/libunwind/src/ 69b8c6469..278e5fbaf (7 commits)
  • 089feda8d Remove some stray unicode look-alike chars from comments.
  • b6f021180 Roll build, buildtools, abseil-cpp, and libc++
  • 1393328db Roll third_party/skia/ 3a79d7a61..e0768dea5 (101 commits)
  • 8ac85712a Roll third_party/nasm/ 7fc833e88..f477acb10 (2 commits)
  • b29767386 Roll gn from e4702d740906 to 7367b0df0a0a
  • 5f77e7d13 Roll Instrumented Libraries from 48a6beefc1bb to 0011c28c8d35 (7 revisions)
  • f13a09ed0 Roll Memory Tools from bb03b820532d to 884774321e20 (1 revision)
  • fea01fa9e Make WideString::ToUTF16LE() do surrogate splitting if needed

4.25.0

5 months ago

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 workflows/main: reinstall monthly schedule
  • a2c79ad slightly update readme
  • 15a35ee nit: move variable
  • e289d61 readme: explain state of system install option
  • a67456d version: dump library loader info
  • bdbf30d musl: update comment
  • d4aa65a update changelog
  • 2dfc4f1 slightly improve prev commit
  • d4c1ef3 Require explicit version with prepared target
  • 30c60af Revert "temporarily comment out testpypi upload"
PDFium commit log

Commits between 6110 and 6164 (latest commit first):

  • 7388bd02f Make WideStringToBuffer() call Utf16EncodeMaybeCopyAndReturnLength()
  • b0ab5e964 Remove unnecessary argument from FuseSurrogates().
  • dbf4b0a4c Tidy GN files by introducing group pdfium_pa.
  • d324c7218 Remove unused FlateEncode() / FlateDecode()
  • 4419e5152 Add comments about ByteString::GetBuffer() and ReleaseBuffer().
  • 069ebe4c9 Introduce result struct for IPWL_FillerNotify::OnBeyforeKeyStroke().
  • c65f45e6b Make CXFA_EventParam constructor take a type argument
  • 5b91a0148 Remove FX_UTF8Decode() in favor of WideString::FromUTF8()
  • d06523d84 Make WideString's FromUTF16BE / FromUTF16LE do surrogate fusing
  • e2704cba8 Use dedicated struct instead of std::pair in ExecuteBoolScript()
  • 28c6c6dc7 Remove out-parameter from CFXJSE_Context::ExecuteScript()
  • ce9900139 Simplify tests that use FORM_GetSelectedText()
  • 03c23083a Use spans in more places
  • 8b2380dce Add pdfium::as_byte_span() helper
  • bee6d0b15 Remove out parameter from DynPropGetterAdapter().
  • 40d92c45b Make WideString's FromUTF16LE(), FromUTF16BE() take bytes, not wchar_t
  • 8c2fc5da8 Roll base/allocator/partition_allocator/ 4d90e004b..6800d0930 (7 commits) https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git/+log/4d90e004b935..6800d0930f06
  • 6bef48cda Unify object type detection code inside cpdf_document.cpp.
  • 4d0aaaa07 Consistently name variables in CPDF_Document::InsertDeletePDFPage()
  • d1debc773 In PDF_DecodeText() UTF-16, do surrogate fusion before language code stripping
  • b98c5b4c0 Clean up CountPages()
  • 43d835b47 Fix object type detection in CPDF_Document::InsertDeletePDFPage()
  • e4424849c Update reclient_version to 0.120.1.f75cfb7-gomaip
  • 0db38df32 Add FPDFPPOEmbedderTest.ImportIntoDocWithWrongPageType test case
  • 8df2e8494 Roll Catapult from 47efdb4b1428 to f0228fa92b0a (63 revisions)
  • aa7d390b4 Add support for UTF-8 text strings
  • 9b8ac25af Simplify PDF_DecodeText() and new helper functions
  • 5adcad9d3 Roll third_party/skia/ 8e9e16841..3a79d7a61 (69 commits)
  • e2b69c4bb Sanity check the inputs to Blend()
  • 6e7f70b39 Replace implicit dependency on global SkFontMgr
  • 1e9d89db3 Extract language code stripping from PDF_DecodeText() into function
  • 445b54a73 Extract surrogate fusing from PDF_DecodeText() into own separate function
  • bb8fd49d1 Simplify Blend()
  • 61307c2ad Unit test Blend()
  • 2962e6ca2 Move Blend() function to its own file.
  • a5bb284fd Roll Zlib from dfc48fc4de8e to 5daffc716bb6 (6 revisions)
  • aae740cc1 Re-organize cppgc::Member<> members
  • 16b2fa3fc Clean up CPDF_PageOrganizer::Init()
  • acddfedb7 CHECK() the bitmap argument in CPDF_RenderStatus::CompositeDIBitmap()
  • ad80a04d3 Split out skcms_sources into multiple GN targets.
  • c512857c0 Roll third_party/skia/ 77aeee3b8..8e9e16841 (187 commits)
  • cba9a3c1d Properly support the use_system_libtiff GN build option
  • fa80feef8 Avoid setting the private tif_fd field in struct tiff
  • 25df6e84c Mention "document outline" in public/fpdf_doc.h
  • 8b1177f2d Fix undefined behavior in FXSYS_wcsnicmp()
  • 5636e90a8 Allow ProcessCrossRefV5Entry() to overwrite existing entries
  • 154e17543 Prefer ClearAndDelete() to delete ExtractAsDangling().
  • d82c698a1 Upgrade vpython3 and wheels
  • 5d87ac6ec Remove "six" python wheel
  • ea0263079 Move fonts used for pixel tests to their own directories
  • 56a444f10 Replace Copy() with operator=() in CPDF_{All,Graphic}States
  • 5746eb685 Rename CPDF_GraphicStates::DefaultStates() to SetDefaultStates().
  • 747015873 Stop inheriting from CPDF_GraphicStates
  • 08f11e596 Roll libpng from 7e1f7e7b1063 to 1db23788f5aa (1 revision)
  • 676f13456 Roll Depot Tools from 73b69b016703 to ea9bf7f343d3 (50 revisions)
  • 1bfae352b Roll Code Coverage from f06a56e5b449 to 61632b07bdc6 (2 revisions)
  • f3b5f3db3 Encapsulate CPDF_GraphicStates member variables
  • 3c2845720 Encapsulate CPDF_AllStates member variables
  • a2dc6ecce Ensure exactly 1 WCHAR_T_IS_*_BIT define is defined
  • 18a2f3c02 Add some unit tests for FXSYS_wcsnicmp()
  • a3ce9f4ae Roll base/allocator/partition_allocator/ 0d03e4082..4d90e004b (14 commits)
  • 2af0a20e3 Fix how FPDFText_LoadFont() detects font glyph count
  • cc923cac5 Add an embedder test to demonstrate a FPDFText_LoadFont() failure
  • 57d1f79d4 Avoid the NULL, 0 undefined behavior problem in CFX_GlyphCache
  • 4da226a07 Change GetFileContents() test utility to return a vector
  • 1bcae281c Roll build/ ab8815d43..292639dc3 (1 commit)
  • 4a4d922ba Roll build/ f4167331a..ab8815d43 (29 commits)
  • 7233e99fc Use span in Processor::ProcessPdf()
  • f0e6edf81 Use pdfium::base::checked_cast() in a few test files
  • 1225d9d80 Remove out-parameter from PathService::GetTestFilePath()
  • 16bebb03b Extend PDFEditImgTest.NewImageObjLoadJpeg to write out a PDF
  • c930b5516 Add missing stdint.h include in span.h
  • 42154f4c1 Rename some "remain" variables to "remaining"
  • 6a34da391 Fix misalignment between Redo and Undo after consecutive text pasting.
  • 5f814e878 Fulfill a TODO in cpdf_dib.cpp
  • 9be49d4b0 Add rust_build_tests to pdfium_all when enable_rust=true
  • ae960583a Roll Instrumented Libraries from 032e9c850ab9 to 48a6beefc1bb (2 revisions)
  • 7a7c86c68 Roll Memory Tools from 8b06a5370188 to bb03b820532d (1 revision)
  • d336e56dc Roll third_party/skia/ e8c78601e..77aeee3b8 (221 commits)
  • 650399315 Update reclient_version to 0.118.1.ae3c3be-gomaip
  • 75815063c Roll base/allocator/partition_allocator/ 6f90cb04a..0d03e4082 (16 commits)
  • f76cff73a Roll third_party/libunwind/src/ 7608093d2..69b8c6469 (6 commits)
  • 70062cf7a Roll v8/ 1fb69d9f5..06aba4270 (284 commits)
  • e21a7e389 Roll fuchsia_gn_sdk_revision and fuchsia sdk

4.24.0

6 months ago

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<T>> to v8::LocalVector<T>.
  • 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

7 months ago

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

7 months ago

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 Roll third_party/zlib/ 3f0af7f1d..fef58692c (1 commit)
  • 7b102f957 Remove span comparisons operators
  • 7b51bf824 Use unsigned size arguments when constructing spans
  • 8df444e7d Roll third_party/zlib/ 235986452..3f0af7f1d (6 commits)
  • b8cd1f00d Remove some more NOTREACHED() usage in core/fpdfapi/parser directory
  • 4c549e6f2 Roll Depot Tools from d7ba85d1eb58 to 73b69b016703 (61 revisions)
  • e48a4b7f7 Roll Code Coverage from 77d952c2aefd to f06a56e5b449 (1 revision)

4.22.0

7 months ago

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)