NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #427 most downloaded on PyPI
Python bindings to PDFium
Last release 1 months ago
13 Aug 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
5 years old
129 releases · first in 2021
One column per quarter.
Removed PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.
API changes
PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.PdfBitmap.get_info() and PdfBitmapInfo, which existed mainly on behalf of data transfer with PdfDocument.render(). Instead, take the info from the PdfBitmap object directly. (If using an adapter that copies, you may want to store the relevant info in variables to avoid holding a reference to the original buffer.)PdfBitmap.fill_rect(): Changed argument order. The color parameter now goes first.PdfBitmap.to_numpy(): If the bitmap is single-channel (grayscale), use a 2d shape to avoid needlessly wrapping each pixel value in a list.PdfBitmap.from_pil(): Removed recopy parameter.PdfObject.get_pos() to .get_bounds().PdfImage.get_size() to .get_px_size().PdfImage.extract(): Removed fb_render option because it does not fit in this API. If the image's rendered bitmap is desired, use .get_bitmap(render=True) in the first place.PdfDocument.get_toc(): Replaced PdfOutlineItem namedtuple with method-oriented wrapper classes PdfBookmark and PdfDest, so callers may retrieve only the properties they actually need. This is closer to pdfium's original API and exposes the underlying raw objects. Provides signed count as-is rather than splitting in n_kids and is_closed. Also distinguishes between dest is None and a dest with unknown mode.PdfMatrix.mirror() parameters v, h to invert_x, invert_y, as the terms horizontal/vertical flip commonly refer to the transformation applied, not the axis around which is being flipped (i.e. the previous v meant flipping around the Y axis, which is vertical, but the resulting transform is inverting the X coordinates and thus actually horizontal). No behavior change if you did not use keyword arguments.PdfTextPage.get_text_range(): Removed implicit translation of default calls to .get_text_bounded(), as pdfium reverted FPDFText_GetText() to UCS-2, which resolves the allocation concern. However, callers are encouraged to explicitly use .get_text_bounded() for full Unicode support.V_PYPDFIUM2, V_LIBPDFIUM, V_BUILDNAME, V_PDFIUM_IS_V8, V_LIBPDFIUM_FULL in favor of PYPDFIUM_INFO, PDFIUM_INFO.Improvements and new features
PdfPosConv and PdfBitmap.get_posconv(page) helper for bidirectional translation between page and bitmap coordinates.PdfObject.get_quad_points() to get the corner points of an image or text object.PdfPage.flatten() (previously semi-private _flatten()), after having found out how to correctly use it. Added check and updated docs accordingly.PdfImage.get_bitmap(render=True), added scale_to_original option (defaults to True) to temporarily scale the image to its native pixel size. This should improve output quality and make the API substantially more useful. Thanks to Lei Zhang for the suggestion.PdfDocument, so it can be used in a with-statement, because opening from a file path binds a file descriptor (usually on the C side), which should be released explicitly, given OS limits.err_code is now assigned to the PdfiumError instance so callers may programmatically handle the error subtype. This addresses {issue}308.PdfPage.render(), added a new option use_bgra_on_transparency. If there is page content with transparency, using BGR(x) may slow down PDFium. Therefore, it is recommended to set this option to True if dynamic (page-dependent) pixel format selection is acceptable. Alternatively, you might want to use only BGRA via force_bitmap_format=pypdfium2.raw.FPDFBitmap_BGRA (at the cost of occupying more memory compared to BGR).PdfBitmap.new_*() methods, avoid use of .from_raw(), and instead call the constructor directly, as most parameters are already known on the caller side when creating a bitmap.PdfPage.remove_obj() is now aware of objects nested in Form XObjects, and will use the new pdfium API FPDFFormObj_RemoveObject() in that case. Correspondingly, a .container attribute has been added to PdfObject, which points to the parent Form XObject, or None if the object is not nested.--invert-lightness --exclude-images post-processing options to render with selective lightness inversion. This may be useful to achieve a "dark theme" for light PDFs while preserving different colors, but goes at the cost of performance. (PDFium also provides a color scheme option, but this only allows you to set colors for certain object types, which are then forced on all instances of the type in question. This may flatten different colors into one, leading to a loss of visual information.)bool(ptr) rather than ptr is None.PdfDocument.save(), changed default of flags from FPDF_NO_INCREMENTAL to 0, as suggested by an upstream maintainer.(type * size).from_address(addressof(first_ptr.contents)) instead of cast(first_ptr, POINTER(type * size)).contents). Thanks to Richard Hundt for the bug report, {issue}346. The root issue (ctypes using an unbounded cache in the first place) has been fixed recently in Python 3.14. See below for a list of APIs that were affected:
_buffer_reader/_buffer_writer under the hood (PdfDocument created from byte stream input, PdfImage.load_jpeg(), PdfDocument.save()).PdfBitmap.from_raw() rsp. PdfBitmap._get_buffer() and their internal callers (PdfBitmap makers new_foreign and new_foreign_simple, PdfImage.get_bitmap())..from_address(...) instead.ctypes._reset_cache() can work around this issue.Platforms
arm64_v8a, armeabi_v7a, x86_64, x86 and iOS arm64 device and arm64, x86_64 simulators are now handled in setup and should implicitly download the right pdfium-binaries. Provided on a best effort basis, and largely untested. Testers/feedback welcome.arm64_v8a and maybe armeabi_v7a wheels, but we do not intend to provide wheels for simulators.)Setup
emplace.py is run, we now pin the pdfium version by default. This is to prevent possible API breakage when pypdfium2 is installed from source. It should also make the git dependency optional on default setup. update.py and craft.py continue to default to the latest pdfium-binaries version.update.py: added --verify option to confirm authenticity of pdfium-binaries release via SLSA provenance. Requires slsa-verifier. Thanks to Benoit Blanchon for the upstream part. Also thanks to ArcticLampyrid for the pointer.build_native.py). This has been inspired by the libpdfium COPR / libpdfium-nojs AUR recipes. Thanks to the respective packagers for showing how to do this. By default, this will use the GCC compiler, but Clang should also work if you set up some symlinks. As of this writing, both passes on our Ubuntu x84_64/arm64 CI.pdfium-binaries, setup now looks for system/libreoffice pdfium. If this is not available either, build_native.py will be triggered. This can also be requested explicitly by setting PDFIUM_PLATFORM to fallback, system-search or build-native.PDFIUM_PLATFORM. Added proper system staging directory. Refactored integration of caller-provided data files to avoid ambiguity. See the updated Readme for details.sourcebuild.py to build_toolchained.py.--single-lib to restore the previous behavior of bundling dependencies into a single pdfium DLL. Setup has been changed accordingly to collect libraries with globbing patterns.build_toolchained.py --update, avoid calling gclient revert and gclient sync, because this seems to sync twice, which is slow. Instead, call only gclient sync with -D --reset.pdfium-binaries, read the full version from the VERSION file embedded in the tarballs. This avoids a potentially expensive git ls-remote call to get Chromium tags.GIVEN_FULLVER and IGNORE_FULLVER env vars to manually set or skip the full version for other targets.LicenseRef-PdfiumThirdParty with BUILD_LICENSES/ directory.PDFIUM_BINDINGS=reference into account on sourcebuild as well. Automatically fall back to reference bindings if ctypesgen is not installed (except on CI).PDFIUM_PLATFORM=sourcebuild, forward the platform tag determined by bdist_wheel's wrapper, rather than using the underlying sysconfig.get_platform() directly. This may provide more accurate results, e.g. on macOS._get_libc_ver(). Instead, call it only on Linux. A negative side effect of calling this unconditionally is that, on non-Linux platforms, an empty string may be returned, in which case the musllinux handler would be reached, which uses non-public API and isn't meant to be called on other platforms (though it seems to have passed).Project
./run file with a justfile. Note that the runfile previously did not fail fast and propagate errors, which is potentially dangerous for a release workflow. This had been fixed on the runfile in v5.0.0b1 before introducing the justfile.tests_old/ back into tests/..reuse/dep5 to more visible REUSE.toml. Removed non-standard .reuse/dep5-wheel.>6635 (effectively >=6638), due to new errchecks.conda/ directory, to avoid polluting the main setup code.<details> <summary>pypdfium2 commit log</summary>
Commits between 5.0.0b1 and 5.0.0b2 (latest commit first):
60b8f3a [autorelease main] update 5.0.0b2a751071 autorelease: prepare for another beta release46192bc Minor Readme improvements746c4ac Style nits04d0961 changelog: add note about 4.30.1 yankd6a6809 test_setup: use verbose installation8ce7c00 setup/autorelease: properly pin pdfium54d9c96 conda_raw: try to fix description rendering4a4d915 Inline post_ver handling into pack_sourcebuild()a40e020 Readme: Hard wrap caller-provided data files code block63a2b5e test_setup: remove outdated todo7d1b315 test_setup workflow: drop python 3.8b27c4f0 req/docs: bump sphinx requirementb0bf367 test_setup workflow: use latest pdfium95f8ee1 Make just check happierf8f746e build(deps): bump slsa-framework/slsa-verifier from 2.7.0 to 2.7.14f76a49 setup: introduce subtargets (#363)c3f3d7b other issue: add stumbling block696ea6a Pick issue template changes from #363f2c3a54 base.py nit: slightly improve a log message0a8f81c Drop non-standard REUSE-wheel.tomlecf0427 PdfDocument.save(flags=): FPDF_NO_INCREMENTAL -> 0739b0e6 Verify pdfium-binaries packages via SLSA (#360)8a5e80d python_api.rst: fix typo in footnote namedc8d108 Flatten BUILD_LICENSES/v8_xfa35a88d2 Add V8 licensesac76eac Fix typo in build_native.py helpe93c594 readme: clean up an orphaned footnote03ef291 Migrate flags lists to tuplesed8961e slightly improve readme, reorder members in setup base6eeb544 Revert "Attempt to verify pdfium-binaries builds (#359)"df92e8c Add musl license to aggregated BUILD_LICENSES8213000 Attempt to verify pdfium-binaries builds (#359)01db641 Check in licenses for V8/XFA enabled builds77d8014 update changelog on remove_obj()20ba258 system_pdfium: join paths properly0e31690 system_pdfium: fix path concatentation914efcb changelog_staging: try to fix orderd48dcfc build_toolchained: align parameters9808c3b build_toolchained: don't use WindowsPath explicitly388ef80 build_toolchained: help nit8c65a9d Update copyright for dependabot.yml56650c4 Licenses branch (#357)72fdb03 readme: reorder "Thanks to" section3792af7 build_native: build abseil as separate shared library88ae1a8 update changeloga86cd52 setup/sourcebuild improvements (#356)9f76534 Also update the Readme86a77d1 Update changelog864d52b win/resources.rc: bump copyright year93b4e5b build_native: prefer NaN over Inf4dd2f3c build_native: use filter() function3225ed9 hash: add "g" prefix3720692 system_pdfium: use run_cmd() for pkg-config0e05c4c build_native: get commit hash if building from main7a6e51f run_cmd: don't merge stderr into stdout by default16dfaa2 conda-helpers build: fix type errorc6f8248 build_native: update a comment1eb51f4 build_native: use git rather than tarballs (#355)7d4091d build_native: set clang_path only if compiler is actually clang742720f build_native: slightly correct help7427ea2 setup: look for system pdfium if we don't have binaries (#353)4c3f8d3 readme: avoid meaningless filler phrases8b0d15c Rename build_lean to build_native1ec780e build_lean: don't use shutil.which()3df6cce build_lean: honor clang base path in lld patch95d73b3 build_lean: indicate build from main in version.json865914e setup.py: expand comments around unknown host6b1b39d Update changelogde3d19b build_lean: add option to override number of build jobsf4036f0 test_sourcebuild: try to fix clang build (#352)98a38bd test_sourcebuild: comment out clang after all6dd18a9 test_sourcebuild: progress on clangd26764e windows: update build patch3a08903 Update sourcebuild test workflow5051e9d Pass just check5b2f26e Lean build script (#350)8bd57b1 Handle new FPDFBitmap_BGRA_Premul pixel format4f6959f PdfBitmap.fill_rect(): tolerate older pdfium3cd7096 readme: shorten libreoffice sectioncaee9ea Slightly update comment in _library_scope.py02783ed bases: slightly relax warning9551425 cli/render: unwrap default PIL hookf0d6c33 Slightly update changelog_stagingee6698c build(deps): bump extractions/setup-just from 2 to 33731559 Avoid creation of sized POINTER types at runtime (#347)09e06cc Replace ./run script with a justfile (#344)4e48c34 Readme: Fix docs build command0d38fa1 Update a comment regarding android58ab942 changelog: pypi should now support PEPs 730/7385288325 sourcebuild: add taskb154a30 posconv: add repr90cf7e2 Rename darwin_universal to darwin_univ26fa0058 Add an explicit exception for legacy mac arches0d0b589 Remove note about intelda1a3d0 Add android_arm64 to extra platforms build example2c3d1a9 emplace.py: fix outdated name in help6687b6e More null-term to NUL-termeda5fc4 changelog nits again4359717 changelog: remove obsolete commentee329f9 PdfImage.extract(): a few cleanupscf8378d changelog: better explain the benefits of scale_to_original46a78f7 GH release: fix inclusion of sdist (amends 9b06578)542f966 Clean up now-unused importb4ff562 Rename "null terminator" to "NUL terminator"f8843dd Remove the textpage version check as well5a87303 Remove some checks for legacy pdfium versions64aaafe changelog nits9b06578 Avoid publishing the attestation files</details>
<details> <summary>PDFium commit log</summary>
Commits between 6996 and 7323 (latest commit first):
7f80ad740 Rename "pDoc" instances to "doc" in //fxjs and //testing02ed40c03 Avoid calls to deprecated GetIsolate methodse8b8183f4 Rename "pDoc" instances to "doc" or "document" in //fpdfsdk and //xfa20159328a Fix a JPEG2000 decoding regressionb000116ef Move RGB conversion code out of CPDF_DIB::LoadJpxBitmap()0294ae7cc Simplify CPDF_SecurityHandler::GetUserPassword()646f89bda Encapsulate more JPEG2000 decoding logicb5b7809a5 Add alternate CJS_Object constructor for testing.468f8ba85 Make jbig2 data in recently-added file more spec-compliant612e92d68 Roll Catapult from a03b70978cc5 to 26075d3aef24 (34 revisions)e51c3ed6c Roll Memory Tools from cc38b4b04fbf to 7f4bdaac14af (1 revision)9128fd668 Roll Depot Tools from 909e2921a011 to dd6e72e96818 (41 revisions)0db284a42 Fix drawing of MMR general regions in JBIG2 imagesf87423057 Use NOTREACHED() in more switch statements inside cpdf_dib.cpp0a845e675 Get rid of JpxDecodeAction::kFail enum value519938c8f golden_fetch.sh: Tolerate dashes in filenames0289dc71b Fix decoding of halftone JBIG2 files that use HENABLESKIP98b41bcc4 Add comments for UNSAFE_TODOs in cpdf_pageobjectholder.cpp5b21a9c19 Update test expectations for macOS 14441eafa8b Roll goldctl from 2da73c426d1b to 39c6fad2c962030a06e26 Update siso_version to f96f46a8e4cf30c097110903d4b71516ef976fb6ea5d1f0b8 Roll third_party/skia/ e8ef1a27c..34a40032f (89 commits; 9 trivial rolls)3c3290b5c Update skia/BUILD.gn and roll third_party/skia71eeeea2c Roll third_party/skia/ df7ab9373..ddb944ebd (134 commits; 20 trivial rolls)305f67d88 Spanify fx_skia_device.cpp and roll third_party/skia58e257468 Roll third_party/rust, third_party/skia6759df861 Roll tools/clang/ a8d02857f..b17ffb3e8 (44 commits)e8def5657 Roll third_party/libunwind/src/ e3eb847e5..634c60974 (3 commits)4ab45c56d Roll v8/ e82d457e6..9bfa30b42 (688 commits)9f3bd4ab8 Update reclient_version to 0.179.0.28341fc7-gomaip4b9edc5ba Roll third_party/libc++abi/src/ aca866473..4a1b48642 (5 commits)3906df47e Roll third_party/llvm-libc/src/ 81a117beb..f37e727ed (98 commits)790e3d1c0 Roll libpng from 058e1ebb3139 to cb7e5155c4a1 (1 revision)ef39ac22b Rename resultdb_version DEPS entry to result_adapter_revision35490756a Update gn_version to 97b68a0bb62b7528bc3491c7949d6804223c2b826fe031a59 Roll third_party/nasm/ 9f916e90e..e2c93c349 (2 commits)a71746210 Roll third_party/googletest/src/ e9092b12d..c67de1173 (10 commits)bfec2a4f5 Roll third_party/freetype/src/ 320b72a29..39d85f169 (34 commits)effd2bcfc Roll base/allocator/partition_allocator/ e3668842c..79b418050 (15 commits)bc45accd9 Roll third_party/simdutf/ 9d3e4d7c1..a1046f20f (2 commits)f3033bbec Roll Zlib from a1f2fe223f55 to 4028ebf8710e (2 revisions)65003eb85 Do IWYU for free()fdb2a3c32 Avoid -Wcharacter-conversione697afe4f Use default/projection forms of C++20 std::ranges::lower_bound()27620197d Fix UNSAFE_TODOs in cpdf_security_handler.cppf2d1266fe Fix FPDFText_GetText() handling with invalid characterse50e167c9 Fix UNSAFE_TODOs in cpdf_crypto_handler.cpp429bf9f4c Add embedder test for FPDFText_GetText() behavior with invalid charsc8d8bdcb9 Fix truncated hash value used in GetEventParaInfoByName().af8ef613c Remove another is_nacl test from PDFium build file.fb4c7337a Avoid some copies in CPDF_TextPage::AddCharInfoBy*()e5f58bf24 Remove IS_NACL codeb86a4ccff Roll Jinja2 from 5e1ee241ab04 to c3027d884967 (1 revision)698a1addd Roll Catapult from 938fc9953b41 to a03b70978cc5 (27 revisions)faeb83f19 Roll MarkupSafe from 9f8efc8637f8 to 4256084ae141 (1 revision)1dbcd29c4 Roll Depot Tools from e0ece52cfb4f to 909e2921a011 (49 revisions)b6457bccc Avoid loose bounds for invalid char codes9ee2baba3 Convert UNSAFE_TODO() to UNSAFE_BUFFERS() at API point.a4646686a Ensure all TrueType Unicode cmap formats are equal5da0e90fa Treat all Unicode character maps like MSUnicodeb8e298a2c Use DecodeTestData::input_span() to avoid UNSAFE_TODOs0f7507cc6 Avoid -Wcharacter-conversion warnings6c8172a19 Change some comments in core/fxcrt/utf16.h to static_assertsfd17f2f5f Fix UNSAFE_TODO() in BC_OnedCode128Writer_unittest.cpp.06efa0399 Improve comment for flags parameter to FPDF_SaveAsCopy()522bc4598 Stop using soon-to-be-deprecated V8 Apisfe0d0540a Roll goldctl from db7e9d50d2f8 to c0a24f7ae77d421860a28 Discard portion of decrypt key longer than 32 bytes.591ce25a2 Fix AES block size as 128 bits (it is always that).08585679e Remove last memcpys from AESa06ddbc0f Resolve some UNSAFE_TODO() in AES096f61b5c Ignore whitespace in ToUnicode codepoint strings54b23007a Fix Form XObject content regeneration when removing objects7fc72177a Pass span to CRYPT_AESSetIV()4c40fce83 [fxge] Modernize cfx_fillrenderoptions2d93912bb Beef up AES test cases prior to spanificationd70b6fd6a Sync third_party/googletest/README.pdfium with Chromium's58ab383fc Roll libpng from 28213bcabe21 to 058e1ebb3139 (2 revisions)be8a89829 Roll third_party/freetype/src/ 2f2dfad59..320b72a29 (74 commits)abfac2f8e Roll third_party/freetype/src/ 4792cff5c..2f2dfad59 (1 commit)0b93112b5 Roll third_party/freetype/src/ 79912716e..4792cff5c (19 commits)7ae4bd4f2 Fix undo counting in CPWL_EditImpl::ReplaceSelection for cut operationsc3c804498 Add FPDFPage_InsertObjectAtIndex() API58b63c9ef Roll third_party/rust/ e4c474081..483563e40 (50 commits)f9977af27 Roll third_party/llvm-libc/src/ e9d9246e8..81a117beb (47 commits)66eadc183 Roll third_party/libc++abi/src/ f2a7f2987..aca866473 (8 commits)2a731f818 Roll third_party/libunwind/src/ 81e2cb40a..e3eb847e5 (6 commits)4e4d7a14a Current font need not contain part of ActualTextc374e352f Roll third_party/skia/ b82ac22e2..eaa402365 (272 commits; 39 trivial rolls)cff4f499c Update resultdb_version to git_revision:5fb3ca203842fd691cab615453f8e5a14302a1d8a61a35790 Update gn_version to 99a82ca8ee957da829d6313b818b99df8e7ccb801e3f4a27 Roll base/allocator/partition_allocator/ 299f79368..e3668842c (15 commits)f532682a2 Roll third_party/googletest/src/ 90a415211..e9092b12d (11 commits)a650631fd Small code simplification in patch drawing0dd9ef40a Roll v8/ 4d69b8272..e82d457e6 (345 commits)24684aa10 Roll Code Coverage from dea8d7c1bd51 to ef6864ec11f1 (2 revisions)95a31df84 Roll Zlib from 6f9b4e619240 to a1f2fe223f55 (8 revisions)ea75ab993 Remove FXARGB_SetRGBOrderDIB()190fe4d3e Correctly handle component bounds for shadings 4-7f16c9fa83 Spanify FXARGB_SetDIB()a1375d8d9 Store 8-bpp mask value as a separate variant in CFX_ScanlineCompositor205d9d92b Use structs to represent mask colors in cfx_scanlinecompositor.cppea8017210 For shading types 4-7, evaluate function per pixel if present200e96136 Roll abseil-cpp, build, buildtools, clang, icu and tools/rust217e37a83 Rename "pDict" instances to "dict"06c12145c pdfium_test: Add a --render-repeats=<n> flagd67b1b105 Support Siso builds66b63bba6 Add another test patch to shade-tensor.ine43a86c0f Add scoped objects and methods for saved doc / page in EmbedderTest8db533196 Rename most "pFont" instances to "font"669737aaf Roll Depot Tools from 1fcc527019d7 to e0ece52cfb4f (51 revisions)77c73af7d Roll Catapult from 000f47cfa393 to 938fc9953b41 (65 revisions)ae7d47693 Remove TODO about upstreaming InsertBraces to Chromium clang-format61cab1eb0 Rename most "pDocument" instances to "document"cf433ae55 Avoid a case of float-int-float conversion in CPDF_Page92725d5c9 Add freetext annotation support to FPDFAnnot_GetFontColor()b81e7ceb3 Add experimental FPDFAnnot_SetFontColor() APIbe2fc5287 Rename IPDF_Page::GetDisplayMatrix()2b754ba30 Handle negative rotation case in CPDF_Page::GetDisplayMatrix()13cb04222 Rename iRotate to rotation139579cce Shorten ScopedEmbedderTestPage to ScopedPage9d59dcd0a Use ByteStringView in more methods17201fb9f Rename CJS_Document::getPropertyInternal()f40f993d3 Change CPDF_Dictionary getters to take ByteStringView83f11d630 Fix build with system libpngcffbd3c96 Add FPDFFormObj_RemoveObject API to remove objects from forms61e138929 Roll goldctl from cce6d37d624f to 649709ff0442baab5f7cd Roll v8/ bb856da62..4d69b8272 (168 commits)00ca21a09 Roll v8/ 0ee17041e..bb856da62 (2 commits)b461f27c0 Roll v8 and simdutf175e50930 Add third_party/dragonbox dependencyf01c61742 Roll base/allocator/partition_allocator/ d691f607f..299f79368 (25 commits)58e8e0ffa Roll base/allocator/partition_allocator/ a5083e082..d691f607f (1 commit)d3b3c3590 Roll base/allocator/partition_allocator/ 53e916ce2..a5083e082 (14 commits)df5eed8d8 Only checkout Highway when V8 is being checked outa378c291e Roll build, clang, and tools/rustc9eac6c71 Roll build/ 2e5d994c2..28c2aef2b (1 commit)155e8a04f Roll build/ 49491ecc7..2e5d994c2 (24 commits)5a18d4587 Roll buildtools/, third_party/libc++/src17d5aeac6 Roll third_party/skia/ 290c4fb91..b82ac22e2 (110 commits; 9 trivial rolls)6551a206a Roll third_party/skia/ 68e53210b..290c4fb91 (1 commit)0be9b6bf1 Move GetDefaultAppearanceString() into cpdf_defaultappearance.cppb1df13e6f Add/remove STL includesa9fd58f6f Replace a (1.0f / 2.0f) with 0.5f2cadd25ea Add test case for a bunch of shading type 7 (and 6) corner cases.c6b8c8e6a Change CPDF_Dictionary::KeyExist() to take ByteStringView429e3b091 Remove out-parameter from CPDF_DefaultAppearance::GetFont()e49c5ef91 Fix testing_rust_revision after pdfium-review.googlesource.com/131370cce603a3d Stop handling coons patches in CFX_SkiaDeviceDriver::DrawShading3d37e944c Implement support for drawing bezier patches61be18b57 Use absl::flat_hash_set inside cpdf_nametree.cpp28557e89b Remove explicit template argument from ScopedSetInsertion usersc432752b4 Add test for multidimensional reinterpret_span<>() flattening.a907ba08a Add FPDFAnnot_SetFormFieldFlags API to modify form field flags0034a5091 Improve FPDF_GetPageWidthF() / FPDF_GetPageHeightF() documentationc92cd178b Rewrite CPDF_Annot::AnnotSubtypeToString() with switch-statementb8e8a35d0 testing/tools: Add a script to renumber objects in file order88d42b166 Extend shade.pdf test93ea99df7 Explain preconditions whenever UNSAFE_BUFFER_USAGE.3e8d18425 Fix GCC build issue in fxcodec.DecodeDataZeroSize test (try 2)1ece8a1b7 Clean up CPDF_DefaultAppearance3ef4650c6 Update reclient_version to 0.177.1.e58c0145-gomaip38d16b8b7 Roll third_party/googletest/src/ 52204f78f..90a415211 (9 commits)642c3be53 Roll third_party/nasm/ 767a169c8..9f916e90e (426 commits)d6ebd129e Roll v8/ 04fa9cbe2..d91bd611c (362 commits)8b14de9bb Roll third_party/libc++abi/src/ 94c5d7a8e..f2a7f2987 (8 commits)f9b941a26 Roll third_party/skia/ 7d56b9cc7..68e53210b (103 commits)0ace6369f Roll third_party/libunwind/src/ 62e217a12..81e2cb40a (2 commits)e265bde6f Fix botched UnownedPtr refactor4d936fae8 Revert "Rework inline image parsing in content streams"6058b2ad6 Revert "Fix crash in CPDF_StreamContentParser::Handle_BeginImageData()"46f456133 Roll third_party/llvm-libc/src/ 4b760d9a7..e9d9246e8 (49 commits)136d704af Roll third_party/freetype/src/ 82090e67c..79912716e (81 commits)acffebe1b Roll third_party/abseil-cpp/ 1e8b41f1e..91f1a3775 (8 commits)9490e64a3 Modernize all remaining operator==() code.1eb36c32e Replace extern const with inline constexpr in //constantsaf6de9b6a Modernize PDFium strings operator==().7d8f6a47b Update android_toolchain_version to KXOia11cm9lVdUdPlbGLu8sCz6Y4ey_HV2s8_8qeqhgC37b2c595a Roll third_party/rust/ d05fde505..e4c474081 (35 commits)3b98432e5 Update gn_version to 487f8353f15456474437df32bb186187b0940b45e73054c2e Modernize StringViewTemplate::operator==().23f69c918 Roll third_party/icu/ c9fb4b3a6..4c8cc4b36 (2 commits)6b0300a6b Fix GCC build issue in fxcodec.DecodeDataZeroSize test2ab9e9324 Roll Zlib from ce5a169f5017 to 6f9b4e619240 (9 revisions)6114b3b18 Roll Memory Tools from 14089a7f57fa to cc38b4b04fbf (1 revision)d1ee8b060 Remove some strlen() calls using pdfium::span_from_cstring()41e5f4098 Replace fxcrt::span_equals() with pdfium::span::operator==6ec1d2f92 Add constexpr {Byte,Wide}StringView unit testsf92aa15fa Update pdfium::Contains() from Chromium0f84b859e Replace MakeFakeUniquePtr() with MatchesUniquePtr()9444ec89c Replace fxcrt::ToArray() with std::to_array()6b13180e1 Convert to C++20 requires clauses in span_util.hae0ead6f6 Remove unnecessary stl_util.h includes7daaacfa0 Convert to more C++20 requires clauses in //core/fxcrta66a29a3d Convert to C++20 requires clauses in //core/fpdfapi789082d68 Convert RetainPtr<> templates to use C++20 requires clausese90e389f9 Remove std::span conversion code from span.h5c21bbded Remove unused internal templates from span.h.ceaecc2e4 Actually remove pdfium::make_span().6397490e1 Replace calls to pdfium::make_span() with CTAD.d2b5a2886 Make pdfium::span<> range constructors consistent0496d8061 Use fast_float::chars_format::allow_leading_plus optionba9bff4f4 Remove uses of deprecated download_from_google_storage --no_auth in DEPS5da39fb3a Remove <string.h> inclusion from span.hd45defc2d Use inline constexpr in cmaps headers69686ef8c Update pdfium::span<> to more closely match C++20 base::span<>bce7ccbf7 Use size_t for indices in CPDF_CMap::GetNextChar()87a497287 Add API to retrieve MIME type from PDF attachments384d40930 Fix nullptr deref in CFXJSE_FormCalcContext::Time2Num()02c94a325 Use std::ranges::find() and find_if()cf64c421d Handle arrays of 1-in, 1-out functions for shading types 4-7953632ef5 Roll Catapult from 5bda0fdab9d9 to 000f47cfa393 (43 revisions)52aa19e0a Roll Code Coverage from 86ab7fc653c4 to dea8d7c1bd51 (11 revisions)69bef25f9 Roll Depot Tools from 3ce438f7f0ba to 1fcc527019d7 (91 revisions)c440145ff Prepare more files for update to pdfium::span<>d91512df6 Roll v8/ c206c46cd..04fa9cbe2 (552 commits)67ca3cf33 Fix crash in CPDF_StreamContentParser::Handle_BeginImageData()e72f115e7 Prepare PDFium for updated base::span implementation.8f09a6363 Add LIFETIME_BOUND to core/fxcrt/compiler_specific.h.0557a2212 Update core/fxcrt/numericsc31ed43be Implement PDF version handling from catalog dictionaryc0bc98d0c Rework inline image parsing in content streamsef236b14e Improve CPDF_StreamParser::ReadInlineStream() span usage23963509e Ignore inline images without EI operators694199148 [fxcrt] Remove IsPowerOfTwo()69bb6260d Remove fxcrt::Fill()dbf0a1bda Replace fxcrt::Fill() with std::ranges::fill()309d5e923 Convert remaining code to google_style_ members7c525236c Roll goldctl from bbe5d9f7f74b to cce6d37d624f042b29dd9 Convert to google_style in core/fpdfapi/renderf7649ff74 Convert to google_style in core/fpdfapi/pagef6ad5f322 Convert to google_style_ naming in core/fpdfapi/parser.660770699 Rewrite core/fpdfapi/{cmaps,font} to google_style_ members3d8aaf446 Update README URLs for filing a new bugc1efd963d Clang-format remainder core files27136666b Clang-format //testinge7231ebb3 Clang-format //fxjsf6d3ca2cd Clang-format core/fxcrt3cf23e17f Clang-format core/fpdfapi1847ad5d0 Clang-format core/fxgefb910dcc5 Replace fxcrt::Fill() with std::ranges::fill() in one spotb5b7e1eb4 Convert to google_style_ member names in core/fxge.cdd0eae7f Improve a few member variables names in fpdfsdkd0dcedc01 Clang-format //fpdfsdk0a26adce0 Clang-format core/fxcodec5af729ea8 Clang-format core/fpdfdocf15df302f Clang-format //fxbarcode53b8f9cdd Fix references to non-existent APIs in fpdf_annot.h127007956 Clang-format //xfa3dba1b629 Convert to google_style_ members in fpdfdocb3466cc54 Convert to google_style_ member naming in fpdfsdk/073395985 Roll third_party/skia/ b5b6f29d6..7d56b9cc7 (100 commits)f9c12a8d7 Roll build, clang and rusta4b11d6be Roll DEPS for abseil, buildtools, and libc++04685b5b9 Clamp PDFium indexed color space hival0c880b1f8 Add pixel test for invalid indexed colorspace hivalcbc692a42 Convert to google_style_ members in core/fxcodec.812b97001 Roll Zlib from 788cb3c270e8 to ce5a169f5017 (1 revision)eeaea7e7f Avoid sharing resources dict entries in CPDF_PageContentGeneratored3b0b84d Improve shared resources dict detection in CPDF_PageContentGeneratorb0972c310 [fpdfdoc] Refactor GetAutoFontSize() to use std::lower_boundd4b22e9d7 Convert to google_style_ members in fwl/7b5cb7854 Change FPDFImageObj_GetRenderedBitmap() to take clip path into account746bdf7d8 Use std::variant inside CPDF_StreamContentParserab1a89811 Convert to google-name_ style in fpdfxfa/572844143 Let FPDFPageObj_SetMatrix() reset dirty bit if restoring image matrix47a0b779b Convert to google_style_ members in xfa/4cc351bb8 Roll third_party/llvm-libc/src/ a02de4d0d..4b760d9a7 (96 commits)8f2fa296e Roll base/allocator/partition_allocator/ 46d880ff6..53e916ce2 (11 commits)3212699ee Roll third_party/googletest/src/ 24a9e940d..52204f78f (9 commits)4abda5669 Roll third_party/nasm/ f477acb10..767a169c8 (1 commit)fa8babff7 Roll third_party/simdutf/ 5a9a2134b..40d1fa26c (1 commit)d00aeec82 Consistently call ProcessGraphics() in CPDF_PageContentGenerator1adeee0a5 Convert to google-style_ member names in fxbarcode/54c3b26e6 Add buganizer component ID to DIR_METADATAa4609adba convert core/fxcrt/css to google_style_ members06e0f2399 Rewrite fxjs/ directory to use google_style_ member names.82a3c81d7 Roll third_party/skia/ 2bc5ed566..b5b6f29d6 (196 commits)d7154f0f0 Roll third_party/freetype/src/ 5d4e649f7..82090e67c (4 commits)cafb72a49 Clang-format unit tests29ab2014d convert fxcrt/ to google-style_ naming.c521814ac Spanify FPDFText_SetCharcodes()b6e873162 Roll third_party/icu/ d30b7b0bb..c9fb4b3a6 (1 commit)61cb98e49 Roll tools/clang/ c5329b322..d05ab7b5b (16 commits)b780c21ce Roll Depot Tools from 50eedb1b5a74 to 3ce438f7f0ba (58 revisions)2f4560fc0 Roll Catapult from 93e56257a508 to 5bda0fdab9d9 (31 revisions)89bebf8b1 Roll Code Coverage from 13e2c8b82298 to 86ab7fc653c4 (5 revisions)c9f0b0fe8 Add FPDFBitmap_BGRA_Premul formateb636a3be Refine NeedToPremultiplyBitmap() logic9fa4c12a4 Remove do_premultiply parameter for CFX_DIBitmap::ScopedPremultiplier1b73b0212 Consolidate pre-multiply checks into a single functiona59bf4f72 Rename cpdf_interactiveform* to use Google C++ variable names533bbc831 Fix various nits in cpdf_interactiveform.cpp098ed663b Clang-format cpdf_interactiveform.cpp519d7d5fc Fix rendering for freetext_annotation_without_da.in8174ab960 Remove CFXColorFromString()a71df3276 Fix rendering for freetext_annotation_with_da.ind75f1ef6b Fix minor issue with freetext annotation test files429385943 Update fixup_pdf_template.py for Python 3.1289da8e11e Roll third_party/skia/ 6ca926db5..2bc5ed566 (1 commit)fec010c74 Remove unnecessary virtual specifierscc534b45e Reuse AnnotationStampWithApChecksum()24779b061 Add CHECK to validate Flate encoding success69c006aa6 Roll Instrumented Libraries from 3cc43119a291 to 69015643b3f6 (1 revision)3f6542840 Roll goldctl from 657d7bc2c9d8 to 3f888b0b05df9232d7c94 Reduce max bitmap size for pdf_scanlinecompositor_fuzzer122a3add7 Still even less memset() in embedder tests.304b383c8 Avoid another memset in scan line compositor.30130534e Avoid still another memset in embedder testscffff9df9 Use aggregate init to avoid memset in CFGAS_FontMgr.fd8dc49b2 Use aggregate init to avoid memset in embedder test.fb252723b Ban abseil variant.h and utility.h libraries in pdfium054a44d24 Add some string constants to CPDF_SimpleFont17414d396 Migrate absl variant.h and utility.h in pdfium9b896087d Roll abseil, build, buildtools and libcxx93b90e60e Return void from CXFA_Node::CalculateWidgetAutoSize().50eaa517a Make ConvertColorScale return void instead of bool.ab8934ea5 Enable unsafe libc call warnings for PDFium.67d63fbbc Roll build, clang, and rust6b44f7c50 Make ClearEmptySection() return void.f2b54058b Make CPDF_FormField::SetItemSelection() and friends return void150f4db10 Convert several CPWL_EditImpl methods to return void.045bfddf5 Return void from UpdateFWLData() and PerformLayout().33b2eb48e Make CXFA_LocaleValue::SetDate(), SetTime() and SetDateTime() void.fad67dead Check more functions returing bool in tests.5dd766372 Make DoActionFieldJavaScript() return void.2b4336400 Make CXFA_FFDocView::InitValidate() and RunValidate() return void.a1c7c8d5e Make EnumFontList() return void6b27c718b Mark ScanlineDecoder::Rewind() as nodiscard03193a5cc Roll third_party/libjpeg_turbo/ 927aabfcd..e14cbfaa8 (2 commits)5a1649e98 Propagate Rewind() errors in ScanlineDecoder::SkipToScanline()9d43ad95e Avoid integer overflow when calculating loose char box139b93407 Roll third_party/skia/ 01b6ccad8..6ca926db5 (146 commits)a769c3f17 Make libunwind DEPS entry Android-only6fede0535 Roll build, buildtools, and libc++c6e8d0640 Roll third_party/abseil-cpp/ 221ee3ed3..2705c6655 (2 commits)375ae5289 Update gn_version to 4a8016dc391553fa1644c0740cc04eaac844121e2661abc18 Roll third_party/libunwind/src/ e55d8cf51..62e217a12 (3 commits)cc0f452e0 Fetch architecture-specific GN binary on Linux33c290918](https://pdfium.googlesource.com/pdfium/+/33c290918544Note truncated.
Updated PDFium from 6996 to 7323 .
See the beta release notes on GitHub here
Removed PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.
API changes
PdfDocument.render() (see deprecation rationale in v4.25 changelog). Instead, use PdfPage.render() with a loop or process pool.PdfBitmap.get_info() and PdfBitmapInfo, which existed mainly on behalf of data transfer with PdfDocument.render(). Instead, take the info from the PdfBitmap object directly. (If using an adapter that copies, you may want to store the relevant info in variables to avoid holding a reference to the original buffer.)PdfBitmap.fill_rect(): Changed argument order. The color parameter now goes first.PdfBitmap.to_numpy(): If the bitmap is single-channel (grayscale), use a 2d shape to avoid needlessly wrapping each pixel value in a list.PdfBitmap.from_pil(): Removed recopy parameter.PdfObject.get_pos() to .get_bounds().PdfImage.get_size() to .get_px_size().PdfImage.extract(): Removed fb_render option because it does not fit in this API. If the image's rendered bitmap is desired, use .get_bitmap(render=True) in the first place.PdfDocument.get_toc(): Replaced PdfOutlineItem namedtuple with method-oriented wrapper classes PdfBookmark and PdfDest, so callers may retrieve only the properties they actually need. This is closer to pdfium's original API and exposes the underlying raw objects. Provides signed count as-is rather than splitting in n_kids and is_closed. Also distinguishes between dest is None and a dest with unknown mode.PdfMatrix.mirror() parameters v, h to invert_x, invert_y, as the terms horizontal/vertical flip commonly refer to the transformation applied, not the axis around which is being flipped (i.e. the previous v meant flipping around the Y axis, which is vertical, but the resulting transform is inverting the X coordinates and thus actually horizontal). No behavior change if you did not use keyword arguments.get_text_range(): Removed implicit translation of default calls to get_text_bounded(), as pdfium reverted FPDFText_GetText() to UCS-2, which resolves the allocation concern. However, callers are encouraged to explicitly use get_text_bounded() for full Unicode support.Improvements and new features
PdfPosConv and PdfBitmap.get_posconv(page) helper for bidirectional translation between page and bitmap coordinates.PdfObject.get_quad_points() to get the corner points of an image or text object.PdfPage.flatten() (previously semi-private _flatten()), after having found out how to correctly use it. Added check and updated docs accordingly.PdfImage.get_bitmap(render=True), added scale_to_original option (defaults to True) to temporarily scale the image to its pixel size. Thanks to Lei Zhang for the suggestion.PdfDocument, so it can be used in a with-statement, because opening from a file path binds a file descriptor (usually on the C side), which should be released explicitly, given OS limits.err_code is now assigned to the PdfiumError instance so callers may programmatically handle the error subtype.PdfPage.render(), added a new option use_bgra_on_transparency. If there is page content with transparency, using BGR(x) may slow down PDFium. Therefore, it is recommended to set this option to True if dynamic (page-dependent) pixel format selection is acceptable. Alternatively, you might want to use only BGRA via force_bitmap_format=pypdfium2.raw.FPDFBitmap_BGRA (at the cost of occupying more memory compared to BGR).PdfBitmap.new_*() methods, avoid use of .from_raw(), and instead call the constructor directly, as most parameters are already known on the caller side when creating a bitmap.--invert-lightness --exclude-images post-processing options to render with selective lightness inversion. This may be useful to achieve a "dark theme" for light PDFs while preserving different colors, but goes at the cost of performance. (PDFium also provides a color scheme option, but this only allows you to set colors for certain object types, which are then forced on all instances of the type in question. This may flatten different colors into one, leading to a loss of visual information.)bool(ptr) rather than ptr is None.Platforms
arm64_v8a, armeabi_v7a, x86_64, x86 are now handled in setup and should implicitly download the right binaries. We do not publish any android wheels at this time (for one thing, PyPI/warehouse does not support them yet). However, we might want to package arm64_v8a (and maybe armeabi_v7a) wheels in the future. Note, android support is provided on a best effort basis, and largely untested (only arm64 Termux prior to PEP 738 has been tested on the author's phone). Please report success or failure.arm64 device and simulator, and x86_64 simulator are now handled and should implicitly download the right binaries. However, this is untested and may not be enough to get all the way through. In particular, the PEP hints that the binary needs to be moved to a Frameworks location, in which case you'd also need to change the library search path. No iOS wheels will be provided at this time. However, if there are testers and an actual demand, iOS arm64 wheels may be enabled in the future.android x86_64/x86, ios arm64_simu/x86_64), as they are only relevant to developers, and installing from source with implicit binary download should be roughly equialvent.Setup
_get_libc_ver(). Instead, call it only on Linux. A negative side effect of calling this unconditionally is that, on non-Linux platforms, an empty string may be returned, in which case the musllinux handler would be reached, which uses non-public API and isn't meant to be called on other platforms (though it seems to have passed).PDFIUM_PLATFORM=sourcebuild, forward the platform tag determined by bdist_wheel's wrapper, rather than using the underlying sysconfig.get_platform() directly. This may provide more accurate results, e.g. on macOS.Project
-eu. This is actually quite important to avoid potentially continuing on a broken state in CI.tests_old/ back into tests/..reuse/dep5/.reuse/dep5-wheel to more visible REUSE.toml/REUSE-wheel.toml.>6635 (effectively >=6638), due to new errchecks that are not version-guarded.conda/ directory, to avoid polluting the main setup code.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.30.1 and 5.0.0b1 (latest commit first):
8ea3c9f [autorelease main] update 5.0.0b1c439329 fix typos6d04fac Take out android for now28ef5b3 docs/conf.py: take out problematic assertion936314f CI/debugging: add verbose: true0882a90 conda_raw: fix upload pathefcf088 conda_raw: temporarily comment out schedulee2a760e fix spelling029327a v5 devel branch (#307)9e55a45 Comment TestPyPI back in</details>
<details> <summary>PDFium commit log</summary>
Commits between 6899 and 6996 (latest commit first):
012fe571c Fix unnecessary tree traversal in SearchNameNodeByNameInternal()3c2bfd785 Refactor SearchNameNodeByNameInternal()a9f2f0f33 Use CIDToGIDMap to fill font widths in FPDFText_LoadCidType2Font()0d2d104ba Roll goldctl from 78856799f02f to 9389855cfb14d69e9855e Add even better compiler-support section to README.md6c386f729 Always initialize CFX_SkiaDeviceDriver::m_bRgbByteOrdera78c76720 Add supported compilers section to README.mdef5fcdf6e Remove some MSVC-specific codefa6581277 Allow options and input files in any order in pdfium_test170de1e03 Fix stack-use-after-scope in pdfium_test2febc2869 Fix FPDFText_GetLooseCharBox() to handle rotation4c7464b07 Add tests to show FPDFText_GetLooseCharBox() bug with rotated text89a94c1b9 Fix test helper to get correct indices from rotated_text.pdf603caea4e Add a helper to FPDFTextEmbedderTest for use with rotated_text.pdfda069983b Roll libpng from cf7c36ed084c to 28213bcabe21 (1 revision)859f92a77 Check the font width array generated by FPDFText_LoadCidType2Font()efe66807a Add GetWidthsArrayForCidFont() helper to fpdf_edit_embeddertest.cppf6da7d235 Add comment for subtle code in CPDF_StreamContentParserfab1b6d64 Add debugging data to help diagnose a hang in fread()6be4f3be7 Rename pdfium_unsafe_buffers_paths.txt filee99f1e8d5 Avoid out of bounds crash when reading fonts594caeb0e Avoid fixed-offset NULL-deref in XFA_Node::InsertChildAndNotify().aacaea19d [AGG] Only add positive dash lengths and gap lengthsb4cf887f7 Add pixel test for negative dash scales3cd0a262c Use AutoRestorer in CPDF_StreamParser::ReadInlineStream()4bc397f60 Rename local variables in CPDF_StreamParser::ReadInlineStream()7420dfeed Fix pdfium_test in Chromium builds when Skia is enabled by defaultd8b668c01 Making CPDF_SyntaxParser::FindTag(ByteStringView tag) robust320fc870f Roll Zlib from 82a5fecf8aae to b763971bcaa3 (1 revision)e116b67b1 Fix bad refactoring in CXFA_TextParser::GetFont()67a00b167 Add test showing copies do not happen in fxcrt::Zip().20b8b48e4 Avoid UNSAFE_TODO() in AreColorIndicesOutOfBounds().28cfa3a8a Remove distinction between input/output views in fxcrt::Zip().ea4eab892 Update documentation and tests for fxcrt::Zip()da206beb2 Make PDFium's compiler_specific.h use clang's UNSAFE_BUFFERS_BUILD4adcb08d8 Roll build, clang, and rust4886ee0d3 Update gn_version to c97a86a72105f3328a540f5a5ab17d11989ab7dded30f70b4 Roll buildtools and libc++16df41e4b Roll v8/ 3e984a9e0..75be3dcb5 (277 commits)0320375fa Add third_party/highway dependencyab72191db Roll third_party/freetype/src/ 0ae7e6073..afc7000ca (9 commits)77e7dee60 Roll v8/ 313e6ed36..3e984a9e0 (189 commits)8198c4e98 Roll third_party/libc++abi/src/ 6c4fa00e4..83dfa1f5b (12 commits)ac5bfacd6 Update reclient_version to re_client_version:0.172.0.3cf60ba5-gomaipd1e80cff3 Roll testing/scripts/rust/ 347b3c20a..6712dc59f (1 commit)0af514970 Roll third_party/llvm-libc/src/ 4c70d6b5a..60b7db20a (87 commits)328507313 Roll third_party/libunwind/src/ 5b01ea4a6..d1e95b102 (4 commits)4ad60e37a Roll third_party/abseil-cpp/ 0b76dfe4f..72093794a (6 commits)84acf3a55 Roll third_party/googletest/src/ d14403194..7d76a231b (6 commits)7f588b3b4 Roll base/allocator/partition_allocator/ c551156ef..9cab8b0d1 (13 commits)b5d8c977c Roll third_party/icu/ 4239b1559..bbccc2f6e (5 commits)1ef5cd32e Roll third_party/skia/ 3db026d62..975788ea9 (248 commits)8d0676e4f Roll third_party/clang-format/script/ 37f6e68a1..1549a8dba (3 commits)c1992c827 Roll Catapult from 6a0960fe97ab to 86d6f8ee6130 (59 revisions)994b9858b Roll Code Coverage from 719f1eba4379 to 5e7c277c0d8c (2 revisions)cbf0bb586 Roll Depot Tools from 8d20c1e0b56c to 58625e82c685 (39 revisions)55a8262e3 Roll goldctl from b2da51fa8d3a to db814b551104a4cbdc9ed Update OpenJPEG to 2.5.3d48287fd9 add missing includes for the build with use_libcxx_modulesb69783fd1 Begin marking unsafe libc functions as UNSAFE_BUFFERS().bea10144d Roll Instrumented Libraries from 69291a3c7c79 to 3cc43119a291 (2 revisions)</details>
Edit: Removed the *.publish.attestation files that were inadvertently included in the GH release.
Updated PDFium from 6899 to 6996 .
See the beta release notes on GitHub here
PdfPage.get_objects(): Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids exc
PdfPage.get_objects(): Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to.extract-images CLI. (The PdfImage.extract() API is not affected this time.)bdist_wheel relocation (moved from wheel to setuptools).PDFIUM_BINDINGS=reference) by actually including them in the sdist and adding a missing mkdir call. (In older versions, this can be worked around by cloning the repository and creating the missing directory manually before installation.)-c defaults with --override-channels, presumably due to an upstream change.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.30.0 and 4.30.1 (latest commit first):
b4e4105 [autorelease main] update 4.30.108041a2 publish: disable attestations, tmp comment outfebe1a4 Changelog nits4fe6445 Q&D adaption to bdist_wheel relocation (fixes #326)067847a Fix reference bindings missing in sdist2ec6bd6 workflows: re-enable conda_raw trigger1320a3f sourcebuild: sync patches with pdfium-binariesbe173a7 changelog fixupb85745a Update test expectations5001bf9 Prepare for possible release860bf97 Revert "Clarify Cannot close object; library is destroyed condition"6736a5d Update licensing docsce1faba Add missing mkdir with refbindings (fixes #320)ff2ff4b Clarify Cannot close object; library is destroyed condition0f4bba8 PR template: use details summary rather than heading6bb675a chore: slightly update PR template7dca75c conda: also add -c defaults in workflowf250b34 CLI/extract-images: Fix another dotted filepath blunder3fd35cf Fix conda packaging (upstream behavior change) (#314)a07372d Update workflows to Python 3.12d8a3128 versioning: swap minor/patch inc default, allow manual override38f5efe PdfPage.get_objects(): don't register objects as kids6f13da6 Slightly fix up changelog</details>
<details open> <summary>PDFium commit log</summary>
Commits between 6462 and 6899 (latest commit first):
The pdfium commit log is omitted this time because it exceeded GH's character limit. See https://github.com/pypdfium2-team/pypdfium2/actions/runs/12419415378/job/34674787577: Error: Error 422: Validation Failed: {"resource":"Release","code":"custom","field":"body","message":"body is too long (maximum is 125000 characters)"}.
That's also why this GH release was created manually.
Update: added commit log as attachment (see below)
</details>
NOTE: This release has been yanked on PyPI due to a text extraction regression introduced in pdfium 6756 . These problems are fixed as of pdfium-binaries 7019 . If you need any pypdfium2 improvements from this release, you can do e.g. PDFIUM_PLATFORM="auto:6462" pip install -v pypdfium2==4.30.1 --no-binary pypdfium2 to install from the sdist with the previous pdfium version. Ideally, you’ll want to migrate to v5.
Updated PDFium from 6462 to 6899 .
PdfPage.get_objects() : Don’t register pageobjects as children, because they don’t need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to.
Fixed another dotted filepath blunder in the extract-images CLI. (The PdfImage.extract() API is not affected this time.)
Adapted setup code to bdist_wheel relocation (moved from wheel to setuptools).
Fixed installation with reference bindings ( PDFIUM_BINDINGS=reference ) by actually including them in the sdist and adding a missing mkdir call. (In older versions, this can be worked around by cloning the repository and creating the missing directory manually before installation.)
Fixed sourcebuild on windows by syncing patches with pdfium-binaries.
Updated test expectations: due to changes in pdfium, some numbers are now slightly different.
Fixed conda packaging: It is now required to explicitly specify -c defaults with --override-channels , presumably due to an upstream change.
Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
Bumped workflows to Python 3.12.
Updated docs on licensing.
This is expected to be the last release of the v4 series.
*Backported bug fixes / corrections from current development branch to preferably leave v4 in a clean state.*
Backported bug fixes / corrections from current development branch to preferably leave v4 in a clean state.
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.pdf.init_forms() must be called before len(pdf).get_text_range() allocation adapt to pdfium version, as FPDFText_GetText() has been reverted to UCS-2. (See v4.28 changelog for background.)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.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.29.0 and 4.30.0 (latest commit first):
6bf53c4 [autorelease main] update 4.30.01e9e100 Add changelog entry for workflows5ad40ab Test both macOS ARM64 and Intel in all workflows600d36c Try to fix main workflow (GH arch change in macOS-latest)a057218 Add changelog for backports653c38c textpage: update docs2577f5b [BP] CLI/render: fix XFA document length recognitioneded6c2 get_text_range(): adapt allocation to pdfium version7ce4d31 PdfImage.extract(): fix for filenames containing non-extension dot5dc2eee issue templates: reorder commands493742d Make issue templates slightly nicer391575a Inhibit autorelease until v5 is merged</details>
<details> <summary>PDFium commit log</summary>
Commits between 6406 and 6462 (latest commit first):
7b7c83fba Roll build/ bbc1efa4c..5eb3babb0 (147 commits)9783ba486 Fix one more edited PDF regression01ea79cec Update hooks for reclient95b1aabea Add one more pixel test for an edited PDF that regressedaaf2cc937 Roll clang to pick up unsafe_buffer_paths.txt format changes.6abd9f147 Introduce fxcrt::try_spancpy() and fxcrt::try_spanmove().89d9beb11 Roll v8/ 7f0739496..0832ba514 (553 commits; 1 trivial rolls)3a2e1651f Roll buildtools and libc++2c9060d69 Roll third_party/abseil-cpp/ a64dd87ce..2c1ad970d (2 commits)c07eb97fd Roll third_party/fp16/src/ 0a92994d7..581ac1c79 (1 commit)32fff0d8c Update gn_version to f284b6b47039a2d7edfcbfc51f52664f82b5a789fa8edc249 Roll third_party/skia/ 7338f5521..04ee4daae (438 commits)4d6d703eb Roll third_party/freetype/src/ f42ce2556..1168b1b5b (15 commits)0a3a3ee5c Roll base/allocator/partition_allocator/ 8a9c3373f..3b0bd80fa (37 commits)ad5237f89 Roll tools/rust/ eaff38a21..8fcf2bf39 (15 commits)95cb40c79 Roll third_party/libc++abi/src/ 1317096ef..51fe35844 (2 commits)2d1bd6c9a Update reclient_version to 0.138.0.e854224-gomaip8342a586d Use spancpy() in more places02ff1756c Fix yet another edited PDF that regressed7d687a0a3 Introduce {Byte,Wide}String::span_with_terminator().64447358e Mark fx_memcpy_wrappers.h functions UNSAFE_BUFFER_USAGE.7cf8895f6 Enable fuzzing with Skia enabled155028a48 Add yet another pixel test for an edited PDF that regressedff78e42df Roll Code Coverage from f459fdcdfc6c to 1b0ca9db1266 (3 revisions)926b395d8 Roll Depot Tools from 4a9d989f52e9 to 4246ba023a15 (107 revisions)0b4ff9a49 Roll libpng from 5140e80f1841 to 34954dfe60ef (2 revisions)863c78226 Roll Instrumented Libraries from 0172d67d98df to 682a735d9f5c (18 revisions)8b5bd138e Roll Catapult from 949df6114f3f to 5fbda23b3a86 (52 revisions)0be533aea Roll Memory Tools from c6d669e13804 to 2448d81f9741 (1 revision)97c93fd37 Roll abseil-cpp, buildtools, clang, and libc++1a5ec9fb4 Gate GDI APIs behind IsUser32AndGdi32Available in cpdf_interactiveform.cppfde20e170 Deduplicate code in CPDF_Parser and rename some methods763c169be Fix parsing of PDFs with multiple cross reference streamsbc759a2ae Add another pixel test for an edited PDF that regressed2c66e07e9 Spanify CFX_SeekableStreamProxyd6a4b27d8 Spanify FPDFText_GetText() and FPDF_GetBoundedText().1a8053c08 Don't allow two-arg span constructor without UNSAFE_BUFFER() annotation.3f197528d Apply UNSAFE_BUFFERS() to two-arg span ctor in core/f0dc864fb Put plugin-specific logic in pdfium_common_config.1eb7ddcf1 Apply UNSAFE_BUFFERS() to two-arg span ctor in xfa/590668ba7 Apply UNSAFE_BUFFERS() to two-arg span ctor in testing/3b679fe3f Apply UNSAFE_BUFFERS() to two-arg span ctor in fpdfsdk/317e40e19 Use new instrumented_libs repo0e4ff8cd8 Roll Zlib from c5bf1b566e5d to d076d8bd0898 (6 revisions)5a49e751e 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}.cppc658519d7 Roll v8/ f6f7c6822..7f0739496 (162 commits)</details>
Commits between `4.28.0` and `4.29.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.28.0 and 4.29.0 (latest commit first):
66cfaa0 [autorelease main] update 4.29.0b1361a7 sourcebuild: generally opt out of PartitionAllocec5b497 docs: improve python_api prefacea8d8c0a update refbindings (path stripping fix)</details>
<details> <summary>PDFium commit log</summary>
Commits between 6337 and 6406 (latest commit first):
b756612c7 Use the new v8 interceptor APIafc399ff5 Roll v8/ fe4ad3b98..f6f7c6822 (302 commits)6af6c6197 Fix unsafe pointer usage in CJX_HostPseudoModelb9ebffc36 Fix typo in {Byte,Wide}StringView.TrimmedRight tests567dff87b Avoid unsafe indexing in EncodeURL()7ca0110e3 Use WriteFloat() inside WriteColorToStream()f6df154e3 Fix some unsafe buffer usage in CPDF_Dest.6ddcbf24b Mark one remaining unsafe function in core/fpdfapi/edit.2855deed0 Do not write out /Page objects that are not in the page treee4cebef61 Roll tools/rust/ 1d0018c65..eaff38a21 (6 commits)b870f6853 Roll third_party/skia/ 32f1cb507..7338f5521 (263 commits)93c8137d8 Roll base/allocator/partition_allocator/ c702699cc..8a9c3373f (30 commits)e707409fc Roll third_party/libc++abi/src/ fc6253a64..1317096ef (2 commits)6123bc06a Roll third_party/libunwind/src/ fc505746f..419b03c0b (2 commits)77b0d2a1b Update reclient_version to 0.134.1.2c9285b-gomaip9dfab8917 Roll third_party/googletest/src/ e4fdb87e7..eff443c6e (7 commits)bf35e1110 Roll third_party/freetype/src/ 2a790a9f4..f42ce2556 (4 commits)483e5e1f5 Change cfx_cmyk_to_srgb code to return struct FX_RGB0095eef10 Improve comments and naming in calculate_pitch.hd43b6ce46 Update gn_version to 93ee9b91423c1f1f53fb5f6cba7b8eef6247a5648ba296abd Roll Depot Tools from fbb0301f1f70 to 4a9d989f52e9 (81 revisions)027aa4b67 Roll Code Coverage from 10ce382356ce to f459fdcdfc6c (9 revisions)d7ec4201b Switch CPDF_MeshStream to use FX_RGBffbbea8d3 Add struct FX_RGB2238fbe1b Add fpdfsdk/{pwl,formfiller,fpdfxfa}/ directories to unsafe buffers.e9b7be916 Make SBThemeData::clrBtnBK a one-dimensional array.008339888 Remove FXSYS_wcstof in favor of system wcstof().e5458325d Add some FPDFDocEmbedderTests that delete pages and savefb8abcb82 Enforce checking the return value of CFX_DIBitmap::Create()8111f8946 Put unsafe buffer configuration into PDFiumfe581ab87 Roll build/ e9a12f276..e5ff2eff3 (85 commits)e58d4d723 Roll third_party/icu/ 1112fa6b3..d94ab131b (8 commits)278639036 Flag remaining unsafe buffer usage in fxcrt.e21f71a90 Change CPDF_MeshStream::ReadColor() to return an array1f9ae706c Fix undefined behavior in DrawGouraud()d9a020955 Fix some nits in DrawGouraud()1c2507320 Roll Catapult from 4dc7721a1444 to 949df6114f3f (83 revisions)ec275ee3e Roll libpng from 3c7486b231c7 to 5140e80f1841 (1 revision)c0800e8bd Remove Skia Sfntly dependency27062af25 Remove more wide string literals.7df165065 Remove some FXSYS_ functions in favor of std::char_traits<>.11b5f3bdb Simplify CFXJSE_NodeHelper::CreateNodeForCondition().a9646b460 Fix regression in coverage_report.pyadc1b16a3 Set a default GN enable_safe_libstdcxx value2f6cef867 Avoid a compiler compatibility issue with CPDF_DefaultAppearancee15b92e44 Convert some WideString::CompareNoCase() to EqualsASCIINoCase().71a0c1d89 Replace ptr/size pair with span in FXJSE_CLASS_DESCRIPTOR.e8ef976cb Remove in-out parameter from GetFontFamily.11f9c8674 Enable UNOWNED_PTR_EXCLUSION checks for debug builds only.b214b50e4 Adjust BUILD.gn files for path-based unsafe buffer warnings.2dc694121 Remove another parameter from CPDF_AnnotList methods7063716b1 Avoid calls to c_str() in cpdf_filespec.cpp.c9f2bf183 Avoid duplicate checks in StringViewTemplate<>::Substr().70e774a94 Remove dead code in RenderPageImpl() calleesb039c387e Improve generated content stream data in cpdf_generateap.cppb119e4ac5 Make FPDFAnnotEmbedderTest.Bug1206 resiliant to changes1eac2c692 Remove use of string to hold binary data in cgdi_device_driver.cpp.f93971a09 Move some fx_system.h replacements into a C++ only section.49089b8ad Add script to fetch images from pdfium-skia gold servercd894790e Change scripts to use autoninja984472732 Roll third_party/skia/ 532505396..32f1cb507 (200 commits)adc3fe713 Increase internal precision in FXSYS_wcstof().112c347ce Generate more legal content stream data in CPDF_GenerateAP91bf0897d Roll build, clang, and rust tools27499934d Properly account for CTM changesbbf4c534e Remove unreachable TranslateImageLine() colorspace code62e50f0cc 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" CTM1655bca8e 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.cpp0e97af8ad Roll abseil, build, buildtools, clang, and partition_allocator4b608cc69 Roll base/allocator/partition_allocator/ 42bf756b3..dd11a7511 (19 commits)95339d668 Roll gn from a2e2717ea670 to 88e8054aff7b149948491 Roll buildtools, libc++, and abseilc065a7bcc Fix cut/paste error in fx_extension_unittest.cpp71bd32dce Generate more modern V8 API calls in js_define.h macrosa00152123 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 valuea22f600ba Roll Depot Tools from af6eabff5313 to fbb0301f1f70 (66 revisions)d6efd7aa0 Roll Code Coverage from 76f45e718405 to 10ce382356ce (4 revisions)</details>
`244491fa8` Mark CVE-2023-52355 as mitigated in third_party/libtiff/METADATA
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.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.27.0 and 4.28.0 (latest commit first):
6d96769 [autorelease main] update 4.28.08f6ecb0 readme/caller-datafiles: update ctypesgen command02cd006 Reduce some RST indents from 4 to 3cd770e6 Add ability to force get_text_range()8daf76b textpage: fix up some typos380f30f Changelog for #29847a2b81 Possible workaround against #298 / pdfium bug 2133 (#301)26e7f60 readme: slightly rephrase2f297a5 Add contributions/response policy</details>
<details> <summary>PDFium commit log</summary>
Commits between 6281 and 6337 (latest commit first):
09fbd30d5 Rename string's raw_span() method to unsigned_span().ef0eeaa9e Fix wrong matrix outputs in CPDF_PageContentGenerator for path objectsf19f46647 Fix wrong matrix outputs in CPDF_PageContentGenerator for text objects081e8bb68 Fix incorrect current transformation matrix when saving PDFs28483abbe Add path objects tests for a PDF saving bug78e300622 Change GetColor() to WriteColorToStream()be20f54f3 Update UNSAFE_BUFFER macros to match chromium/src/base71e2229aa Add text object version of a more complex test for a PDF saving bugff374196e Remove out-parameters from CPDF_Color::GetRGB()967494c5e Remove out-parameters from CPDF_ColorState::Set{Color,Pattern}()3189488fe Do no write out identity matrices in CPDF_PageContentGenerator8ebeb124b Fix building with GCC504ae0c73 Fix nits in CPDF_PageContentGeneratorTest3055d3857 Make CFX_RenderDevice::GetDIBits() take RetainPtrs by value36cd3f41e Rename some colorspace methodsac728e5cb Rename CPDF_ICCBasedCS member variables8fa6a324c Roll third_party/zlib/ 646b7f569..3787595bb (4 commits)03e96fc9d Remove the matrix from CPDF_GeneralState624807fbd Avoid "unsafe" string indexing in PDF_NameEncode().f1805084d Convert EXPECT_STREQ(x, y.c_str()) to EXPECT_EQ(x, y).0c6ef5db1 Avoid result string with trailing NUL in XFA Decode().82e2c19b8 Roll third_party/skia/ 9832c7722..49f18efdf (331 commits)85589aac0 Roll Catapult from f448d5bf8e57 to 4dc7721a1444 (93 revisions)22f234e4d Roll libpng from f11b2ae20fa0 to 3c7486b231c7 (2 revisions)530f34f13 Roll third_party/skia/ 6279c88b9..9832c7722 (80 commits)60bcaeb27 Make core/fxcrt compliant with UNSAFE_BUFFERS() macro.0744e71e2 Avoid some UNSAFE_BUFFER noise in fpdf_parser_utility.h.df60f7f4c Fix incorrect matrix outputs in CPDF_PageContentGenerator074387f08 Add a more complex test for a PDF saving bug88eff81cc Add a test case for a PDF saving bug314d76477 Simplify PDF_EncodeText() using FX_UTF16Encode()af1239af6 Make CPDF_IccProfile's dependency more direct3771a29b4 Remove CFX_Font::IsEmbedded()050ae79e8 Stop making CPDF_IccProfile an Observable038d39b31 Avoid more future unsafe buffer usage in StringDataTemplate.9108588e6 Move remaining code out of third_party/base and into core/fxcrtb8ea87677 Remove remaining NoDestructor usage01e6d560e Convert some C-style arrays to std::array<>.a7fca8a4f Add a way to undo a previous FPDF_SetSystemFontInfo() callb4fb36188 Re-write some unsafe string code prior to UNSAFE_BUFFERS.fec5a9706 Roll v8/ b6fd2f17b..a86e19715 (464 commits)04a9cf6cb Make CodePointView::Iterator() demonstrably safe.f3209d029 Fix build with chrome plugin enabled but Partition Alloc disabled,7f1ff0f44 Roll MarkupSafe from 0bad08bb207b to e582d7f0edb9 (1 revision)2be9efb5f Roll Instrumented Libraries from 0011c28c8d35 to 0893d760101b (1 revision)132a5215a Roll Jinja2 from e2d024354e11 to c9c77525ea20 (1 revision)43bfc30b0 Copy absl::WrapUnique()'s static_asserts into pdfium::WrapUnique()6261e1499 Remove code in the form of "return std::move(local_var);"d72fd575f Move third_party/base/ptr_util.h to core/fxcrt34e34057a Merge third_party/base/memory/aligned_memory.h into fx_memory.hee6325efe Move third_party/base/test/scoped_locale.* to testing81b3f39ed Move third_party/base/{debug,win} to core/fxcrte89957979 Convert CFX_XMLParser::current_text_ to WideStringf36006cdf Move third_party/base/numerics to core/fxcrt/numericsd4c0790fe Rename TrimLeft()/TrimRight() to TrimFront()/TrimBack().1908cfc53 add file annot apif778d3c42 Move third_party/base/containers/*.h to core/fxcrt/containers86aa2fb2e Move {Byte,Wide}String::Trim{,Left,Right}() into StringTemplate<>ba6031ad9 Force LF line ending for the AUTHORS file67963ba70 Remove Fuchsia supporta426b95b7 Fix typo in public/fpdf_sysfontinfo.h812acaddb Disallow absl::optional usage via include_rules05f42a1cc Enforce checkdeps when submitting CLs1d732b2aa Fix include rules in cfx_glyphcache.cpp37935952b Move third_party/base/span.h to core/fxcrt7a3e5c034 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* functions006476b26 Move {Byte,Wide}String::Insert() to StringTemplate<T>b9bd64794 Move {Byte,Wide}String::Delete() into StringTemplate<T>.12772dac9 Consolidate byteorder code2edcdd72f Fix use-after-move in CPDF_RenderStatus::CompositeDIBitmap()549afab11 Convert fx_random.cpp to use safe typesaecfce306 Use std::array<> in fx_coordinates.cpp.e0742615a Add missing includes uncovered by libc++ changeca0dc045d Roll third_party/skia/ a9db1213b..6279c88b9 (349 commits)a747ba711 Roll build/ 9ca0d2ce9..386c65667 (118 commits)f283eab76 Add UNSAFE_BUFFER annotations to fx_dib.h4ccd18a00 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.hdf0228d9b Put GetBuffer() and ReleaseBuffer() in StringBaseTemplate64571d5d1 Avoid adding stream objects directly to arrays in CPDF_SyntaxParser88b642dd8 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.cppc3bf5b2ae Add runtime check for streams in CPDF_Array::SetAtInternal() and friends778a2f631 Do not let CPDF_Array::SetNewAt() and friends take a CPDF_Streamba0b98cbc Make RenderDeviceDriverIface::SetDIBits() take RetainPtrs by value9dfb129b5 Return RetainPtr<> from StringData::Create()c764fe091 Avoid UNSAFE_BUFFER operations in core/fxcrt/{byte,wide}string.h467e8dde5 Remove ByteString::AllocCopy() and WideString::AllocCopy().bb51448d6 Ensure CPDF_Stream's dictionary is always a direct object4fbdcdcbf Give "V4" and "V5" parser code better names244491fa8 Mark CVE-2023-52355 as mitigated in third_party/libtiff/METADATAd85e88249 Fix PDF loading when an initial xref stream references a xref table24c6be692 Switch from absl::optional to std::optionaldb46cc55f Add another pixel test for incorrect cross reference stream handling907b76519 Sync Chromium's include_rules for Abseil59f3856c9 Spanify FX_strstr() and FX_wcsstr()35d21add5 Avoid potential msan warnings in test SpanEquals.Empty4097f1d49 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.h03a847d67 Tidy some code in fx_crypt_aes.cpp187fa9288 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 XObject4c76a8ffe Update reclient_version to 0.130.0.546556b-gomaip8a4b1b742 Roll third_party/libunwind/src/ 2602aecdf..fc505746f (7 commits)8017ac552 Roll gn from 85944ebc24a9 to a2e2717ea670c385302dc 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 files815cc45c3 Revert ProcessCrossRefV5Entry() overwrite changea8e1f1379 Add pixel test for an edited PDF that regressed</details>
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 com
$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.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.26.0 and 4.27.0 (latest commit first):
4c4c362 [autorelease main] update 4.27.02d165af readme: remove outdated helper112fb34 Readme: mention prominent embeddersb0352a1 Correctly reland commit 0d1cc2134b356b Revert "Bump setup-miniconda 2->3 & {upload,download}-artifact 3->4"137b71a Add dependabot to changeloged32d64 dependabot: ignore broken workflow-dispatch 121d94ee90 build(deps): bump actions/setup-python from 4 to 5ca59682 build(deps): bump actions/upload-pages-artifact from 1 to 300556fe Bump deploy-pages from 1 to 4 (closes #294)21ca95b Create dependabot.yml for GH actions0d1cc21 Bump setup-miniconda 2->3 & {upload,download}-artifact 3->49cb5c38 Remove some legacy code for conda_rawa584927 misc improvements0324787 workflows/test_sourcebuild: check version9289258 workflows/test_sourcebuild: fix typo3b4ef4b Try to fix sourcebuild2e84994 autorelease: remove excessive note/todo/fixme marksa8c3cd3 Remove git status assertbb68b1a dirty: pass through previous state via env vardb4ebbb Add some checks before ignoring dirty state4558229 ctypesgen: allow passing in custom pre-processor7248bc4 build: call into API directlyfab4102 Avoid odd use of any() where or does the trickd968173 readme/PDFIUM_PLATFORM: account for none -> sdist renaminga2d66dd Update changelog71b7a20 craft_packages/pypi: allow building sdist/wheels only629bb97 craft_packages: make ctypesgen pin configurableaf5216b slightly polish manifest / setup.cfgebc8715 Bump copyright year24d438f fix license of ./run script3e93f56 Amend changelogc72b7a9 Revert "temporarily comment out testpypi upload"</details>
<details> <summary>PDFium commit log</summary>
Commits between 6233 and 6281 (latest commit first):
7c7a6087e Add FPDFText_LoadCidType2Font() API41015d113 Encapsulate FT_Get_Glyph_Name() calls in CFX_Face4d00d9737 Fix another typo in ToUnicode template constantf22325c95 Make PDF_USE_SKIA a public build definitionccc38c258 Remove more dead code in CFX_DIBitmap8abe178b4 Clean up CPDF_RenderStatus::LoadSMask()fe586ee39 Remove dead code in CFX_DIBitmape24607c76 Roll base/allocator/partition_allocator/ 72b7e1a3f..42bf756b3 (38 commits)202ebe6ad Roll Catapult from f2abc0cd0cd8 to f448d5bf8e57 (64 revisions)dfd1ec916 Roll Memory Tools from 216d33bbf954 to 4753a8cbcd7c (4 revisions)9a2b614bd Roll libpng from 1db23788f5aa to f11b2ae20fa0 (1 revision)bdfe4aa57 Unshare CFX_DIBitmap::SetChannelFromBitmap()4bf70256b Remove CFX_Face::GetAdjusted{Ascender,Descender} methods6f3cf81a8 Change MultiplyAlphaMask() to take a CFX_DIBitmap82f4360b8 Consolidate code into CPDF_ImageRenderer::CalculateDrawImage()cbf5da504 Refactor LoadCompositeFont() to extract useful helper functionsa88402105 Check for errors first in LoadSimpleFont() and LoadCompositeFont()e06220af3 Rename many variables inside fpdf_edittext.cpp7666160f5 Fix various nits inside fpdf_edittext.cpp (for reals)f689b6a68 Fix various nits inside fpdf_edittext.cppd617c4e8b Update readme for Reclient instead of Goma32c29e431 Encapsulate more bounding box code in CFX_Face3f7847662 Move NormalizeFontMetric() out of CPDF_Fonta0fd10adf Rewrite and rename CPDF_Font::TT2PDF()4be416d76 Give variables better names in CPDF_ImageRenderer54f25ce7a Ensure CPDF_Stream always has a dictionary720ffea6a Fix typo in ToUnicode template constant8acd78867 Remove the ability to create an uninitialized CPDF_Stream88d3d5674 Simplify CPDF_Stream::InitStreamFromFile() and minimize usagef21a92341 Remove CPDF_Stream::InitStreamWithEmptyData()bfc71b9f8 Add more CPDF_Stream constructors4c4f9ab25 Roll v8/ 83ad2aebb..b6fd2f17b (257 commits)ed6dfc4cd Do not let CPDF_Array::SetAt() and friends take a CPDF_Stream41109a4bb 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_Stream595d4fb37 Double the form XObject limit25d775f4e Import base::span_from_ref() into span.h7b9fa8a5e Simplify IsObjectStream() inside cpdf_object_stream.cpp75e77041a Do not let CPDF_Dictionary::SetFor() take a CPDF_Stream40dd82860 Introduce fxcrt::reinterpret_span<>()29ec83a0e Make CFX_RenderDevice::StretchBitMask() take RetainPtrs by valuea12a3ec57 Make RenderDeviceDriverIface::StretchDIBits() take RetainPtrs by value03ad3c563 Make CPDF_ToUnicodeMap::HandleBeginBFRange() fasterf6fc06e8e Keep ubsan ignorelist.txt to use regex2ddc2233d 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 value203a271b8 Handle MultiplyAlpha(1.0f) within MultiplyAlpha()9423718a7 Remove out-parameter from CFX_DIBBase::ConvertBuffer()e0892d95e Make RenderDeviceDriverIface::SetBitsWithMask() bitmap params const1ee2be3c7 Remove dead code from CFX_DIBBase::ConvertBuffer() and related code281b2c413 Remove unused CFX_DIBitmap::SetPixel()0a2a8a32e Change CPDF_ImageRenderer to store a float alpha value68f94c8c4 Pass RetainPtrs in CFX_RenderDevice and CFX_DIBitmap by value8b2f58994 Change CFX_RenderDevice::StartDIBitsWithBlend() to take a float alphacdadc9032 Change CPDF_RenderStatus::CompositeDIBitmap() to take a float alpha31b7951f6 Change CFX_ImageRenderer to use float alpha values376c79ba1 Change CFX_BitmapComposer to use float alpha values2f66170bd Switch to NOTREACHED_NORETURN() in core/fxge/win3213eb23bec Make RenderDeviceDriverIface::MultiplyAlphaMask() parameter more const7a42572bb Change SetBitsWithMask() methods to take alpha as a floataa332c819 Change RenderDeviceDriverIface::StartDIBits() to take alpha as a float02881c0a7 Change CFX_DIBitmap::MultiplyAlpha() to take a float111a8a2a3 Avoid overloading MultiplyAlpha()57e5c5fd3 Implement CFX_DefaultRenderDevice::Clear() for all build configs3cbf75f84 Make RenderDeviceDriverIface more const-correcta1d7dbd4c Make CFX_DIBitmap more const-correct7532c21d1 Remove dead code in CFX_DefaultRenderDevice::AttachAggImpl()b0a3f99a9 Make CFX_RenderDevice::GetBitmap() const-correct2b0890f3f Mark CFX_RenderDevice::SetBitmap() as protectedd569a5d1b Avoid FT_FaceRec usage in various places9e6c4f02f Roll Depot Tools from 1714cc6e5ae3 to 35a530663508 (41 revisions)05c3c8cc7 Roll Code Coverage from d0698ae5eae9 to 2bd00824f032 (2 revisions)</details>
`a7a1e6a48` Switch away from deprecated v8::Object::SetAccessor() calls
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.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.25.0 and 4.26.0 (latest commit first):
93650f0 [autorelease main] update 4.26.08f45f33 temporarily comment out testpypi uploadd11ed9f Add changelog regarding sdist7aba111 Presumably fix PyPI upload of sdist (ignore dirty)1e7536f Add back manylinux2014 to be on the safe sideb774be5 some cleanups2eb90a2 Slightly improve PR templatea1a1d37 conda_helpers: blacklist pdfium 6219a521a6e readme: move down condaba2db80 setup/bindings: fix flags not being passed throughcf256ee Adapt to change in pdfium headers6ef3b44 add back srcinfo to bindings file0db98b4 Mark regex as sucha9d6dfc Adapt to c_void_p -> int auto-cast47857b6 sdist: implement ctypesgen pin7e90ecd Call into ctypesgen API directly51612d3 Counterpart to ctypesgen library_sharing branch (#285)</details>
<details> <summary>PDFium commit log</summary>
Commits between 6164 and 6233 (latest commit first):
29ff08e81 Roll v8/ fc242dcac..83ad2aebb (53 commits)a7424743f Add third_party/fp16 dependencyf6d55c802 Relax pitch check in CFX_DIBitmap::CalculatePitchAndSize()06b951386 Enhance FixedSizeDataVector<>.d7e87b0a6 Roll tools/clang/ dbe34d7b7..2b9d966ec (5 commits)4337c488a Roll buildtools/ and third_party/libc++/src/2049878d9 Show FPDFBitmap_GetFormat() issue for bitmaps with external buffer950682b99 Use std::vector<> in testing/test_fonts.h43f921adf Roll v8/ 3469157c0..fc242dcac (66 commits)143c5b262 Update reclient_version to 0.125.0.f3883c2-gomaipfbd64b666 Roll third_party/libunwind/src/ 278e5fbaf..2602aecdf (3 commits)05af9ea18 Roll third_party/libc++abi/src/ 4cb5c2cef..8806fb8bb (5 commits)da14fcb53 Simplify matcher string in fxcrt death tests4821f9fb8 Update android_toolchain_version to wpJvg81kuXdMM66r_l9Doa-pLfR6S26Jd1x40LpwWEoC62938cd83 Update gn_version to 85944ebc24a90ec1e489e85a46fdc68542c3146fa03eebd66 Add missing FontEncoding::kNone value8810061a8 Roll tools/rust/ 9f2ba7f84..e721a72ad (11 commits)dddfd7190 Roll third_party/freetype/src/ 8f255c89e..ca76683b7 (8 commits)3eae66ac2 Roll third_party/skia/ e0768dea5..a9db1213b (208 commits)a2f26cdf4 Roll build/ 9b8bc79c2..9ca0d2ce9 (79 commits)328af3224 Fix Skia + EMF rendering for transparencies899ff64f2 Roll base/allocator/partition_allocator/ 82380dc78..72b7e1a3f (24 commits)f2d10c6cb Roll third_party/abseil-cpp/ 0764ad493..b7ad4e9ef (9 commits)593dcd2d9 Roll Memory Tools from 884774321e20 to 216d33bbf954 (2 revisions)a7755c59d Roll Catapult from f0228fa92b0a to f2abc0cd0cd8 (60 revisions)88ad55aba Make fxge::FontEncoding independent from FT_Encoding7b129a284 Encapsulate FT_Get_First_Char() and FT_Get_Next_Char()704cc481c Fix regression where FPDFText_FindNext() cannot find the search term471679d54 Use the dedicated ConfigurePartitionsForTesting()3e624ce0f Roll base/allocator/partition_allocator/ e9591a3fa..82380dc78 (24 commits)9f94a1a4a Add more FPDFTextEmbedderTests for finding text45a5ea16c Add FPDFTextEmbedderTest case to show FPDFText_FindNext() regressed3f3cb7b65 Validate width against stride in CFX_DIBitmap::CalculatePitchAndSize().24a713a85 Remove CPDF_CrossRefTable::ObjectType::kObjStream57e284ba2 Roll Zlib from 5daffc716bb6 to 562a4372d176 (12 revisions)a2c91f07a Encapsulate FT_Get_Sfnt_Table() calls2708849c4 Encapsulate FT_Load_Sfnt_Table() calls592da1277 Encapsulate FT_Get_Char_Index() and FT_Get_Name_Index() calls7f50e6e23 Encapsulate font charmap code inside CFX_Facea9d080a7f Deduplicate constants / macros between cfx_face.cpp and cfx_font.cpp4870bd3e2 Move some FreeType-specific code from CFX_Font to CFX_Facebd3e9f3d9 Remove unused CFPF_SkiaFont code65dc04dda Move CFX_GlyphBitmap creation code into CFX_Face::RenderGlyph()4f26084fa Remove spurious fx_freetype.h includesb2d4f1104 Add pdf_enable_fontations GN flag2cc859137 Roll v8/ e725aa2be..3469157c0 (140 commits)07b01a0f6 Encapsulate FT_Select_Charmap() inside CFX_Face69f05fecc Add enum class fxge::FontEncodingb26a1101d Rename SKIA_SUPPORT to PDF_USE_SKIA79be3dc12 Roll tools/clang/ abf153714..dbe34d7b7 (21 commits)c199ca664 Add flag to disable blink gc plugin checkdda631d81 Encapsulate font metrics code inside CFX_Face2d34bcaab 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_Face0527caf4c Encapsulate font name code inside CFX_Facecf2e29e38 Encapsulate font stream code inside CFX_Facef4e15e992 Encapsulate font style code inside CFX_Faceb70a91734 Encapsulate font flag code inside CFX_Facecb1cd2f12 Convert FX_Number to absl::variant<>.cb19b4be6 Remove CPDF_RenderOptions::RenderType.2c8f00392 Consistently use "page_object" in public/fpdf_edit.h76a26983e 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() crash64cfae43c Return v8::Local<> from CFXJSE_RuntimeData::GetRootContext().f810210f2 Roll base/allocator/partition_allocator/ 6800d0930..e9591a3fa (47 commits)e6ee9ef0a Sync PartitionAlloc config with Chromium'sf68bb7f1c Roll v8/ a7273c4f2..e725aa2be (305 commits)630703378 Avoid some comparisons against data.size() - 1.5c8b497cd Unconditionally enable absl support in googletestf8b509b20 Roll v8/ a9cdaea34..a7273c4f2 (303 commits)a7a1e6a48 Switch away from deprecated v8::Object::SetAccessor() calls8361a18bb 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 7367b0df0a0a5f77e7d13 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</details>
Updated PDFium from 6164 to 6233 .
Pin ctypesgen in sdist to prevent re-occurrence of #264 / #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.
Wheel tags: Added back manylinux2014 in addition to manylinux_{glibc_ver} to be on the safe side. Suspected relation to the above issues.
Removed multiprocessing from deprecated PdfDocument.render() API and replaced with linear rendering. See below for more info.
PdfDocument.render() API and replaced with linear rendering. See below for more info.pypdfium2 -v.279.PdfDocument.render() deprecationnougat project.4.22.0, the pool was always initialized with os.cpu_count() processes by default, even when rendering less pages.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.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.
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.24.0 and 4.25.0 (latest commit first):
45dbb2c [autorelease main] update 4.25.06f5df31 workflows/main: minor comments cleanup4c0aee6 conda: get rid of effectively dead bundling code816f421 craft_packages: cut overly extensive commentsd140de2 Handle latest version separately for conda pdfium/pypdfium2_raw63a17ba conda: sync pypdfium2_raw schedule with pdfium-binariescdb1fe4 instruct ctypesgen to exclude some garbage symbolsadf89b0 docs correctionafc4740 reinstall schedule6024f15 Make document-level renderer harmless by linearization (#282)7c53bd1 temporarily inhibit schedule0fe8578 ctypesgen: add --no-macro-guards8f0a425 readme: update ABI bindings section6a0a67b get_text_range: slightly enhance docs5886522 improve changelog/template, add tasksacd1719 conda/recipes: do not wrap env vars in quotes after allf3cc2dd continue on refbindings0822682 continue on PR template (setup)e26b24d Prepare changelogf93532d setup: avoid explicit mention of clangad56b56 docs: continue on conda54d2ffc craft/conda: update a code comment59dc178 issue-templates: rename "package" to "install" in titles9a1dcd3 Inline build version handling in craft_packages3b418eb conda_raw: handle rebuilds (#280)ecb77d2 Add skia to refbindings flags (+ thoughts on external headers)01727fc setup-miniconda: correct channel prioa5f2c5b PR template nits100d7e4 Tighten issue template descriptionsddc8abc refbindings: define feature flags136a655 setup: fix blunder in headers cache logic67de448 Continue on PR templatea1037a3 Add draft pull request template9f54a76 issue template generic: clarify checkbox 2 (CC #277)c5c558a Add note on version info8b454c0 nits24839ea conda: slightly improve script and recipes9e73c75 wf/conda: try to make sure we install the built package8a438f8 readme: conda section again2fbac25 workflows/conda: remove a redundant layer of channelsc6dd1d1 readme: rework conda section again28649ad issues/conda: check python executable07d336e readme: revise conda instructions45e8f0c cli/version: show only libpath rather than whole loader info81f24de dep5-wheel: add helpers version file09d194f manifest: fix missing reuse/dep5 include blunder1cf9442 req: sunset defaults.txtd95efed req: test implies converters9e29101 workflows/main: reinstall monthly schedulea2c79ad slightly update readme15a35ee nit: move variablee289d61 readme: explain state of system install optiona67456d version: dump library loader infobdbf30d musl: update commentd4aa65a update changelog2dfc4f1 slightly improve prev commitd4c1ef3 Require explicit version with prepared target30c60af Revert "temporarily comment out testpypi upload"</details>
<details> <summary>PDFium commit log</summary>
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 argument5b91a0148 Remove FX_UTF8Decode() in favor of WideString::FromUTF8()d06523d84 Make WideString's FromUTF16BE / FromUTF16LE do surrogate fusinge2704cba8 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 places8b2380dce Add pdfium::as_byte_span() helperbee6d0b15 Remove out parameter from DynPropGetterAdapter().40d92c45b Make WideString's FromUTF16LE(), FromUTF16BE() take bytes, not wchar_t8c2fc5da8 Roll base/allocator/partition_allocator/ 4d90e004b..6800d0930 (7 commits) https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git/+log/4d90e004b935..6800d0930f066bef48cda 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 strippingb98c5b4c0 Clean up CountPages()43d835b47 Fix object type detection in CPDF_Document::InsertDeletePDFPage()e4424849c Update reclient_version to 0.120.1.f75cfb7-gomaip0db38df32 Add FPDFPPOEmbedderTest.ImportIntoDocWithWrongPageType test case8df2e8494 Roll Catapult from 47efdb4b1428 to f0228fa92b0a (63 revisions)aa7d390b4 Add support for UTF-8 text strings9b8ac25af Simplify PDF_DecodeText() and new helper functions5adcad9d3 Roll third_party/skia/ 8e9e16841..3a79d7a61 (69 commits)e2b69c4bb Sanity check the inputs to Blend()6e7f70b39 Replace implicit dependency on global SkFontMgr1e9d89db3 Extract language code stripping from PDF_DecodeText() into function445b54a73 Extract surrogate fusing from PDF_DecodeText() into own separate functionbb8fd49d1 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<> members16b2fa3fc 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 optionfa80feef8 Avoid setting the private tif_fd field in struct tiff25df6e84c Mention "document outline" in public/fpdf_doc.h8b1177f2d Fix undefined behavior in FXSYS_wcsnicmp()5636e90a8 Allow ProcessCrossRefV5Entry() to overwrite existing entries154e17543 Prefer ClearAndDelete() to delete ExtractAsDangling().d82c698a1 Upgrade vpython3 and wheels5d87ac6ec Remove "six" python wheelea0263079 Move fonts used for pixel tests to their own directories56a444f10 Replace Copy() with operator=() in CPDF_{All,Graphic}States5746eb685 Rename CPDF_GraphicStates::DefaultStates() to SetDefaultStates().747015873 Stop inheriting from CPDF_GraphicStates08f11e596 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 variables3c2845720 Encapsulate CPDF_AllStates member variablesa2dc6ecce Ensure exactly 1 WCHAR_T_IS_*_BIT define is defined18a2f3c02 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 countcc923cac5 Add an embedder test to demonstrate a FPDFText_LoadFont() failure57d1f79d4 Avoid the NULL, 0 undefined behavior problem in CFX_GlyphCache4da226a07 Change GetFileContents() test utility to return a vector1bcae281c 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 files1225d9d80 Remove out-parameter from PathService::GetTestFilePath()16bebb03b Extend PDFEditImgTest.NewImageObjLoadJpeg to write out a PDFc930b5516 Add missing stdint.h include in span.h42154f4c1 Rename some "remain" variables to "remaining"6a34da391 Fix misalignment between Redo and Undo after consecutive text pasting.5f814e878 Fulfill a TODO in cpdf_dib.cpp9be49d4b0 Add rust_build_tests to pdfium_all when enable_rust=trueae960583a 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-gomaip75815063c 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</details>
Commits between `4.23.1` and `4.24.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.23.1 and 4.24.0 (latest commit first):
71d143f [autorelease] update changelog and version filec49dcca temporarily comment out testpypi uploada222c06 Fix sdist package getting wrong name1b0a5c6 slightly polish previous commitabd8a4f sourcebuild: actually fix version (closes #276)13ae34b Fix generic issue template stylee10f667 Revert "sourcebuild: try to fix version..."01c2355 sourcebuild: try to fix version...4f2d3cc sourcebuild: add fixme regarding version923e258 sourcebuild: build config correctionsa7e5aa3 readme/install-system-caller: revise origin again51da8a6 workflows/trigger: temporarily comment out main schedule7d31730 setup nits/comments9ca64b9 readme/install-source-caller: change origin format51dab26 readme/issues: continue286294b readme: add anchor icons to linksd7ef006 Add draft instructions to build with caller-provided files798b02b sourcebuild: comment out use_custom_libcxxa308025 to_full(): use namedtuple, improve sourcebuild version style46e81b1 emplace: add back prettier reprd23b9f8 issue template nitsddab675 Revert "Make conda and prepared detectable"063e4ec Make conda and prepared detectablef04f757 readme: try to make install sections linkable without heading04c095d Continue on issue templates44946e2 Add comment regarding to_full()a4fc943 bindings cache: take guard_symbols into account3f3dd40 emplace: improve prints6d860a4 emplace/bindings: use cached headers if availablebe2e25d emplace: use binary cache if only bindings are missing8a33235 refbindings: allow system library loadingdf54e88 update_pdfium: fix descriptions (CC #272)a397ff7 templates/conda: add call to conda config --get39e12e0 ctypesgen: add --no-system-libsearch if --runtime-libdirs given0dd8e34 Improve issue templatesdb1e956 Add basic issue templates (#271)a5454bf Minor style improvements3aa6c15 slightly reorder conda instructions (install line first)5fb49a5 Simplify conda instructions341c360 conda_helpers: avoid embedding test suite</details>
<details> <summary>PDFium commit log</summary>
Commits between 6097 and 6110 (latest commit first):
0a34b6b28 Convert std::vector<v8::Local<T>> to v8::LocalVector<T>.607c3faa1 Fix potential leak in CGdiplusExt90589d465 Replace const-ref std::vector arguments with pdfium::span in fxjs.fc412acd0 Revert recent C++20 usage in CFX_FillRenderOptions03c04196f Remove unnecessary LoadLibrary() call in CGdiplusExtfdb409aaf Roll third_party/freetype/src/ 7b308a29d..55d0287cf (17 commits)9091e26f4 Add a test for rendering a transparency onto a white background647a08001 Add support for the Rust toolchain9cb2d6887 Update gn_version to e4702d7409069c4f12d45ea7b7f0890717ca3f4be5f05d9c6 Roll third_party/libjpeg_turbo/ 30bdb85e3..9b894306e (2 commits)df282a629 Roll third_party/icu/ 985b9a6f7..a622de35a (2 commits)9f182f957 Roll abseil-cpp, libcxx, libcxxabi, clang, buildtools and builda3895af47 Roll Catapult from 4f81c1e29597 to 47efdb4b1428 (70 revisions)</details>
Updated PDFium from 6097 to 6110 .
Added GitHub issue templates.
Commits between `4.23.0` and `4.23.1` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.23.0 and 4.23.1 (latest commit first):
b1c62f3 [autorelease] update changelog and version file69f8d76 Prepare new releaseec280df update changelog779872d Swap GH and PyPI publishing</details>
Changed PDFIUM_PLATFORM=none to strictly exclude all data files. Added new target system consuming bindings and version files supplied by the caller.
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.setup.cfg since we need a dynamic project name, which pyproject.toml does not support.git describe, providing definite identification.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.@jerbob92.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.21.0 and 4.22.0 (latest commit first):
9c5f0ba [autorelease] update changelog and version filef285ca2 changelog formatting nits08577f7 Restore autorelease schedule30c2373 Improve version integration (#263)3100bfe Never spawn more processes than we have pages3be189f Grant permission for GH pages dispatch (supposedly fixes #265)</details>
<details> <summary>PDFium commit log</summary>
Commits between 6056 and 6070 (latest commit first):
7ea179817 Remove an alias in enum CPDF_CrossRefTable::ObjectType127eed924 Demonstrate a WAI FPDFPage_RemoveObject() failure casee6ae00084 Change UnicodesForPredefinedCharSet() to return a span4fbc06ab7 Replace fxcrt::SmallBuffer with absl::InlinedVector0575de1b7 Use more WideStringViews in cfxjse_formcalc_context utility functions6943be26e Disentangle pdfium::span<> from unowned_ptr<>.6fc5cf499 Remove NoDestructor usage in CPDF_StreamContentParser8cfb59aa3 Upgrade libtiff from 4.5.1 to 4.6.04bbfbecec Mark 2 libtiff CVEs as mitigatedcdc2dda5a Remove the ability to instantiate CPDF_PageModule21b96ced8 Remove CPDF_PageModule::ClearStockFont()7c6c8fffb Move stock colorspace management out of CPDF_PageModule69db74fd3 Remove reference to ProbeForLowSeverityLifetimeIssue()9ac21c8d5 Update header comment for unowned_ptr.h85bb72cc1 Roll Memory Tools from 68be21429138 to 8b06a5370188 (1 revision)</details>
*Note: Earlier releases may fail to install from source due to API-breaking changes to our ctypesgen fork (see {issue}264). Where possible, avoid sour…
PdfTextPage.get_text_range(): Correct the allocation in case of excluded/inserted chars, modify scope to prevent pdfium from reading beyond range(index, index+count) (which otherwise it does with leading excluded chars). Update docs to note the two different representations. Thanks to Nikita Rybak for the discovery ({issue}261).
Setup changes (partly ported from the devel branch)
$PDFIUM_VERSION and $PDFIUM_USE_V8 into the existing $PDFIUM_PLATFORM specifier (see Readme for updated description). The relatively minor setup API breakage was considered tolerable; the core library API is not affected.build package from pyproject buildsystem requires, where it was unnecessary. Thanks to Anaconda Team.Switched PyPI upload to "trusted publishing" (OIDC), which is considered safer. Further, the core maintainers have set up 2FA as requested by PyPI.
Note: Earlier releases may fail to install from source due to API-breaking changes to our ctypesgen fork (see {issue}264). Where possible, avoid source installs and use the wheels instead (the default behavior). If you actually have to do this, consider --no-build-isolation and pre-installed dependencies, including ctypesgen prior to commit 61c638b.
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.21.0b1 and 4.21.0 (latest commit first):
0f17303 [autorelease] update changelog and version file3e4127a Prepare changelog for releasea76b4b8 Temporarily pause autoreleasef143916 nit: code comments28be13b Abbreviate platform->plat system->sys979f12e Expand renaming (binary -> platform, prefer abbrevs)b2ce32c Retain $PDFIUM_PLATFORM env vara809333 Use default src include if all modules given4ae0661 Don't generate what we don't use747b726 setup_base nitscf817e3 Make check-wheel-contents happy, update changelog36701a6 Move raw bindings to separate module (CC #256)89aaf06 ctypesgen nit: align order of defines60ff803 setup: switch mostly to glob import88281ae Update tasksc80b912 Add _WIN32 only if on a windows hostceafb41 ctypesgen: try to expose windows-only members on windows51d1b4e ctypesgen: set compile-libdirs if possiblecd5cfc6 Skip symbol guards, except for reference bindingsbbcd3a1 readme: fix typo found by codespell7e0145d setup: align libnames28f6865 setup: restrict ctypesgen to fork3530d74 Port setup changes from devel branch (#262)a99aec0 Add note on test case failing with pdfium 6015456899c [Hotfix] get_text_range: don't lose l_passive (CC #261)3d23c56 Update changelog (CC #261)fdf95fc Update docs for get_text_range() (CC #261)535398d Continue on #261a9c6485 Partially fix #261339e0b1 readme: GH pages nit</details>
<details> <summary>PDFium commit log</summary>
Commits between 6002 and 6056 (latest commit first):
edf48f97b Tidy UnownedPtr<> as a result of previous simplification.4e17899bb Adjust guard macros around PdfiumSpanDeathTest.DanglingReference.1e7353640 Remove ProbeForLowSeverityLifetimeIssue() from UnownedPtr.7b7a48c4b Always use base::raw_ptr<> implementation when PartitionAlloc is present3476811a8 Shorten PartitionAlloc includes.6c5202203 Apply pdfium_core_config to fuzzer_init_publicdc4e60e8e Fix dangling ptrs in embeddertest found by BRP dangling ptr detector.72637154d Update android_toolchain_version to NSOM616pOQCfRfDAhC72ltgjyUQp9lAWCMzlmgB18dACe130a1431 Add missing UnPreMultiply() call when processing transparenciese3593d647 Avoid rendering into the device in CPDF_RenderContext::GetBackground()820848e16 Roll abseil, build, buildtools, clang, and libcxx together5e3018d79 Roll Fuchsia SDK from 14.20230826.1.1 to 15.20230930.1.1b2f8486e8 Roll v8/ 7584acae2..3eb7d73cb (370 commits)77b1d8a97 Roll base/trace_event/common/ 147f65333..29ac73db5 (1 commit)4ff3bdb95 Roll third_party/libunwind/src/ a321409e6..7608093d2 (14 commits)1d94005e9 Roll third_party/freetype/src/ 000b26a30..7b308a29d (25 commits)1c7fcc4d3 Roll third_party/skia/ 0a253625a..d8ec08c6d (499 commits)cd93aa4bf Update gn_version to 991530ce394efb58fcd848195469022fa17ae12640c0ea26c Roll third_party/libc++abi/src/ aae4ca0f5..e8e4eb8f1 (17 commits)c8f9d23f8 Roll base/allocator/partition_allocator/ b22ccba48..2f4afa63f (42 commits)8cf636e15 Roll Catapult from f16ca3c78e46 to 4f81c1e29597 (79 revisions)5cdaf28d0 Skia: Call UnPreMultiply() in FPDF_RenderPage()1d550b829 Add new public API FPDF_GetDocUserPermissions1aa7ef9f9 Rename FPDFPage_Move() to FPDF_MovePages()b3dea94ae Add MovePages API to rearrange pages in a PDF document.9b17e472e Match pixel-based tests against both the GDI and default renderer4bf7922ac Slightly simplify CFX_DIBitmap::UnPreMultiply()60dfe9b0a Avoid some unnecessary SharedCopyOnWrite copies503690367 Add FPDFDocEmbedderTest.DeletePageAndRender test casec5c06c3a6 This change fixes an issue in CPDFXFA_Context::DeletePage.033126e7f Remove redundant code in CFX_SkiaDeviceDriver dtordb20d00b8 Combine CPDF_DeviceBuffer::Initialize() and GetBuffer()e47319725 Always check CFX_RenderDevice::CreateCompatibleBitmap() return value3753799bf Simplify XFA_DrawImage() and related code960d65600 Improve CFX_SkiaDeviceDriver ctor error handling5fbd16426 Make the DebugValidate() checks used by CFX_SkiaDeviceDriver less strict40ee07642 Check CFX_DIBitmap::Create() result in ProgressiveDecoder1a19bbed8 [Fuchsia] Remove fuchsia_target_api_level from .gn3145a9b91 Unsuppress several passing GDI tests1dc2fc989 Remove unreachable code from CFX_DIBBase::ConvertTo()700b9fbf8 Modernize parts of CPDFSDK_AnnotIteratorb5bc2e929 Refine FPDFImageObj_GetBitmap() behavior372d25d7d Roll Zlib from f5fd0ad2663e to 235986452b31 (1 revision)71c92d906 Roll Depot Tools from 427f0f43ad0c to d7ba85d1eb58 (39 revisions)b22fc9a07 Don't implement CPDF_DIB::GetBuffer() (try 2)55835a2c6 Use fxge::CalculatePitch8() in more placese29681f11 Make graphics resource names share-on-write0cfa0a76d Avoid another PartitionAlloc allocator shim incompatibility331f2dcff Add an embedder test for crbug.com/pdfium/189301175ba1d Update third_party/base/sys_byteorder.h07c64fda1 Remove some NOTREACHED() usage in core/fpdfapi/parser directoryc186235a1 Rename CPDF_ImageLoader::HandleFailure() to Finish()1e1e17305 Fix unusable FPDFBitmap_GetBuffer() return valuesa098449f6 Remove FXRC_BITMASK_OUTPUT806593eef Use spans in CFX_Palette getters010031c98 Clean up CFX_Palette9eec95782 Improve invalid ICC profile handling75ff13168 Reinstate CPDF_FormField DCHECKs and improve SetValue()a836c20b8 Move CPDF_ColorSpace::IsValidIccComponents() to IccTransformf74bf767b Update reclient version to re_client_version:0.114.2.81e819b-gomaip</details>
Warning: Since this release was made during testing and the following TestPyPI upload failed, the TestPyPI/PyPI packages originate from a different, f
Warning: Since this release was made during testing and the following TestPyPI upload failed, the TestPyPI/PyPI packages originate from a different, follow-up workflow run (GH release action silently passes by creating a draft if a release of same ID exists already). The packages from this release should be identical, but this was not inherently ensured.
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.20.0 and 4.21.0b1 (latest commit first):
385370b [autorelease] update changelog and version file84e4d9d [Test] Try to fix repo push6dfbd81 workflows/publish: stop explicitly installing twinedd69022 Prepare beta update to test new PyPI publishingfd32934 Update changelog for next released6e10d9 Merge pull request #259 from pypdfium2-team/trusted-publishers00475b4 Switch PyPI upload to "trusted publishing" (OIDC)2506427 CI: Bump actions/checkout to v44846475 readme: update "unofficial distributions" section</details>
<details> <summary>PDFium commit log</summary>
Commits between 5989 and 6002 (latest commit first):
92a572635 Improve CPDF_CMapParser::HandleCid() performance1af4f5b62 Remove old buildtools llvm repo paths.5c350448e Roll v8/ 41ff48bd6..7584acae2 (472 commits)b2789e383 Fix FPDF_ImportPages fails if dest_doc doesn't have "Info" objectc2cef63c9 Explicitly encode SkImages with Png encodercf536a313 Roll third_party/fuchsia-gn-sdk/ and build/866ab8d25 Roll third_party/skia/ b5f614a85..0a253625a (334 commits)599507d26 Add a test to show import APIs do not work for docs without Info dicts6ea677cae Use more scopers in embedder testsb9fd8eb44 [PA] Templatenize alloc flagse6af9d92e Roll third_party/depot_tools/ 59e101154..427f0f43a (137 commits; 21 trivial rolls)205fb97f4 Roll third_party/icu/ de4ce0071..985b9a6f7 (2 commits)f3d1dc22d Update gn_version to cc56a0f98bb34accd5323316e0292575ff17a5d4def1743b2 Roll buildtools/third_party/libunwind/trunk/ e5a9c50e5..a321409e6 (5 commits)cc6c8eca6 Roll third_party/zlib/ 526382e41..f5fd0ad26 (2 commits)bf0c157ae Remove some useless CFX_DIBBase::RealizeIfNeeded() callsc0991a43e Roll tools/memory/ 2a4c4ba1f..68be21429 (2 commits)febf6a33c Roll buildtools/third_party/libc++abi/trunk/ d4760c0af..aae4ca0f5 (6 commits)c7bf139be Roll third_party/freetype/src/ b2584c738..000b26a30 (20 commits)95e2f9ede Roll base/allocator/partition_allocator/ f91d5ba23..b22ccba48 (58 commits)d6585d6e6 Roll Fuchsia SDK from 14.20230727.2.1 to 14.20230826.1.1435756da3 Roll third_party/abseil-cpp/ 2288062ee..7affa303e (5 commits)edba08523 Roll third_party/libpng/ 805df541c..7e1f7e7b1 (1 commit)955ab3319 Roll buildtools/ 16be42a9f..b2043d4f4 (11 commits)d74703942 Roll Catapult from 220cbb13b5a7 to f16ca3c78e46 (106 revisions)8e97cf530 Roll Code Coverage from bce4cdc2309e to 77d952c2aefd (1 revision)</details>
`c837803` [BP] Fix RTD build (system_packages opt deprecation/removal)
This release backports some key fixes/improvements from the development branch:
PDFIUM_PLATFORM=none (sdist). This prevents encoding a potentially incorrect version. Also improve CLI version print.system_packages option removal).<details> <summary>pypdfium2 commit log</summary>
Commits between 4.19.0 and 4.20.0 (latest commit first):
7361289 [autorelease] update changelog and version file76b51ad readme: fix n_digits (closes #255)d4c19b3 [ctypesgen fork] prevent setting bad struct fieldsc837803 [BP] Fix RTD build (system_packages opt deprecation/removal)1302e77 CLI: improve version print953f8e1 [Hotfix] PDFIUM_PLATFORM=none: set pdfium version to unknowna1d00da [Hotfix] make sure we have a digit version before casting99c8b7e Merge pull request #253 from pypdfium2-team/backportsf35421b [BP] changelog: remove wrong guess5fbb229 [BP] cli/render: move saving from main process into jobsfbab9b0 [BP] PdfDocument.render(): Fix non-API implementation issues7e77b26 Clean up planned changesf145e5e docs: fix myst warning suppression9055c6c Prepare changelogb8f37b6 [BP] Fix sourcebuild with system librariesf66c08f [BP] init_forms(): Fix XFA init79cb619 [BP] Expose V8/XFA specific members if applicablef9d5f10 GH pages: don't run on every commit, build for releases onlydf47a9c [BP] Automatic GH pages rebuild on release</details>
<details> <summary>PDFium commit log</summary>
Commits between 5975 and 5989 (latest commit first):
7221eb515 Roll tools/clang/ 236e66ffd..9fc887ccd (33 commits)96be44fbc Replace overly-strong DCHECK() in CPDF_FormField::SetItemSelection().159bccb7f PA: Temporary option for new PartitionAlloc location.8d5a792d5 Prevent crashes in win32 GDI code due to null bitmap pointers</details>
Reset main branch to stable and shifted v5 development to a branch, so that pdfium updates (and possibly bug fixes) can still be handled. v5 developme
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.18.0 and 4.19.0 (latest commit first):
96065fc [autorelease] update changelog and version filedf73327 Shift development to branch, restore autorelease</details>
<details> <summary>PDFium commit log</summary>
Commits between 5868 and 5975 (latest commit first):
16d6eb8b6 [Skia] Fix issues for printing 24 BPP images53cec0ad6 Use fxge::CalculatePitch8() in CFX_DIBBase45aa4b105 Respect the return value of SetBitsWithMask()ef1ef9548 Remove 2 corpus tests from GDI suppression listec291c1b0 Remove NOTREACHED() in CachedImage::GetBuffer()39292f380 Add FPDFText_IsHyphen functionb756bbe70 Remove CPDF_FormField::LoadDA() declaration7952b46dd Stop building (empty) Skia AVX and SSSE3 opts files5cac3f6f0 Roll third_party/skia/ 6119b059f..b5f614a85 (247 commits)f73ad4764 Make FPDF_GetDocPermissions() consistent for XFA vs. non-XFAd5d465279 Remove spurious calls to FPDF_GetDocPermissions()618ecdfae Fix clang-tidy warnings for fx_skia_device.cpp909a33cd7 Resolve some simple clang-tidy warnings.017b1aa0f Split TextObject rect for each kPiece1627c9a09 Replace bytes.removesuffix() call2d789adfb Avoid multiplication widening warnings in JBig2fb2885c20 Remove NOTREACHED() usage in fxjs directory409124709 Remove third_party/base/base_export.hdf6fed9f3 Roll v8/ 127e21985..41ff48bd6 (425 commits)76f27a1e7 Roll buildtools/clang_format/script/ f97059df7..e5337933f (10 commits)c1c25bb7a Saturate, rather than CHECK() in FX_Number1e33b3d28 Cast v8::Object::GetInternalField() return value to v8::Value832d6bb42 Roll Catapult from 7d7df42f80f3 to 220cbb13b5a7 (115 revisions)442caf194 Roll Code Coverage from cb9f2d5c70a8 to bce4cdc2309e (1 revision)41a47681b CHECK range before casting float to int in fxnumbere54bb263c Use constexpr points array to avoid indexing in DrawThisAppearance().96b9ad342 Make fx_coordinates.h types have constexpr constructors.074490b71 Switch to NOTREACHED_NORETURN() in xfa dir4ae353f1e [fpdf_structtree] Support references for attribute list/numberc1bd7b5d0 Switch libcxx paths from trunk -> src.9f8b6bfcd Roll buildtools/third_party/libunwind/trunk/ f1c687e0a..e5a9c50e5 (2 commits)637bfca2f Roll buildtools/third_party/libc++abi/trunk/ 8d21803b9..d4760c0af (2 commits)689b96876 Move third_party/base/ptr_util.h into third_party/base/memory/0241a3d59 Allow StructElement_Attr_GetName to return buflen with null buffer22b07cad3 Remove //third_party:third_party target11e639bc8 Merge third_party/skia_shared code into core/fpdfapi/edit212493e8b Fix some DCHECK_OP signness mismatchesa917fcc95 Roll third_party/skia/ c59638231..6119b059f (226 commits)7ce8d2330 Roll third_party/skia/ 3ea9412ad..c59638231 (1 commit)1dab6189b Update gn_version to 3fccef9033b950e8935e8debeba9fbd71617bc74acd622cf2 Roll third_party/abseil-cpp/ 6b7d3f3b0..2288062ee (7 commits)757433318 Roll third_party/freetype/src/ e4586d960..b2584c738 (15 commits)e33975a51 Roll Fuchsia SDK from 13.20230629.2.1 to 14.20230727.2.16e41cff18 Roll buildtools/ 6d00f8d8c..16be42a9f (8 commits)073cb4919 Roll third_party/zlib/ f999826d2..526382e41 (9 commits)45e5d5eb2 Re-organize malloc shim tests.7f8f07e22 Roll third_party/icu/ e8c3bc9ea..de4ce0071 (3 commits)41e44fc1b Switch from pdfium::clamp() to std::clamp()3f0bf8d52 Roll third_party/depot_tools/ 064883063..59e101154 (70 commits; 26 trivial rolls)91d9d4e57 Move third_party/base/span.h into third_party/base/containers/d647c71e1 Roll tools/memory/ 57b3b9e7c..2a4c4ba1f (2 commits)e325e5245 Roll third_party/skia/ 10a43e57e..3ea9412ad (167 commits)fb159d610 Remove break statements after NOTREACHED_NORETURN()a1c125c98 Change TestResult log from bytes to str (part 2)065810725 Roll third_party/libjpeg_turbo/ aa4075f11..30bdb85e3 (2 commits)55e793a8f Only define test_runner_py when standalone5d3955e11 Roll tools/clang/ 2cd52f556..236e66ffd (18 commits)89875d3b3 [PA] Fix public_deps in pdfium.f07f001bb Move shim partition configuration to separate test file.1e4b7c2e4 Roll base/allocator/partition_allocator/ 9e9b9fe53..f91d5ba23 (15 commits)49e8b0918 Roll build/ 7eef81aea..336e34d44 (11 commits)290ad31ff Change TestResult log from bytes to stra6e4eb363 Reland "Don't include missing paths in CAS tree"e12acdbe8 Roll build/ c1a8cf672..7eef81aea (148 commits)0ebe24d14 Small AGG build config improvements50b418293 Revert "Don't include missing paths in CAS tree"16c574c18 Don't include missing paths in CAS treeab959fa38 Switch to officially supported PA-E malloc shim.1383b5e48 IWYU: add string.h for strncmp in CFX_GifContext8d5ff8ffd No need to depend on all of base in chromium build.10c541c91 Add comments to pdf_use_partition_alloc GN arg.fad049256 Remove lss dependencyd9e3f3fd6 Consolidate some pdf_is_standalone build logicd8dbc5259 XFA: Recognize delta objects as nodes72299abe6 Add .gitignore for //third_party/libcxx8846d562b Handle failed Realize() in MakeCachedImage()b8a335fda Update comment on pdf_is_standalone in pdfium.gnic183fcf9a Add duplicate libcxx source repo paths.ab5e39b8f Roll base/allocator/partition_allocator/ f9a7b0a0e..9e9b9fe53 (16 commits)216568c41 Beef up BRP-protection tests prior to using PA-E shim4b4e4e8b9 Speculative fix for crash in CGdiDeviceDriver::GDI_StretchDIBits()234ec6cb8 Avoid misaligned loads in LoadGlobalPersistentVariablesFromBuffer().a164c9bec Remove string.h inclusion from fx_system.h3abb4490c Fix ubsan null-ptr warnings in pdfium_embeddertestsb0a11e9c6 Wrap mem*() functions to handle zero-length nullptr cases.bf9170ee4 Make CPDF_ToUnicodeMap::StringToCode() tolerate whitespaces03e309bf0 Make span_util.h wrappers completely compliant with ubsan.bd4515474 Switch to NOTREACHED_NORETURN() in fxbarcoded4ae8a236 [Skia] Enable fxge.SkiaStateText for Skia78fee0d0b [ssci] Added Shipped field to READMEs909e5a7d8 Avoid forthcoming check-raw-ptr-to-stack-allocated diagnostic.96153592d Roll v8/ 9888bdc17..127e21985 (937 commits)0485b62cf Roll Instrumented Libraries from 0f536d22dbed to 032e9c850ab9 (1 revision)69b5e0eeb Optimize empty map cases in CPDF_CrossRefTable::UpdateInfo()d9dcf21d3 Avoid unnecessary array indexing in CPDF_DefaultAppearanceacfec013f Avoid adding std::size() to compute end pointers.92fa1456d Switch to std::array<> in CPDF_FontGlobals.56ff98ee7 Use spancpy() on CFX_CodecMemory buffers.892602286 Avoid pointer arithmetic in string_view_template.h.45f3f76fd Use span operations in JBig2_Bitstream.01e6b8620 Convert bounds-check from DCHECK() to CHECK() in JBig2_ArithDecoder8ea56a4c5 Rename some tables in cfx_cssdata.cpp to kStyle naming.b86e5b575 Rename PDF_CharType array to kPDFCharTypes.b99937de4 Make generate_cas_paths.py output deterministicbce0a8f1e Write CAS archive paths for test_runner.py tests86ba98da3 Switch to NOTREACHED_NORETURN() in xfa/fxfa/parserda4eb2682 Make FX_Free() a macrodc9bc0b80 Stop compiling (empty) SkOpts_skx.cpp file in Skia51ed5d06c Call Free() for a specific ParitionRoot718f99ae6 Upgrade libtiff from 4.5.0 to 4.5.1fc813437a Add METADATA file to track mitigated security patches for libtiffe9a111cfb Pass options directly to PartitionAllocator's ctor295ed7181 Roll base/allocator/partition_allocator/ ad18d83b7..f9a7b0a0e (15 commits)5967378ac Roll Jinja2 from 264c07d7e64f to 515dd10de9bf (1 revision)c749bfe97 Roll MarkupSafe from 13f4e8c9e206 to 006709ba3ed8 (1 revision)8c7852a6c Roll Code Coverage from 8ec74a909da4 to cb9f2d5c70a8 (8 revisions)693edb7a0 Roll Catapult from f51324c1c818 to 7d7df42f80f3 (80 revisions)9f7b32519 Test rendering an annotation with FPDF_PRINTING flag9f8cfe803 Harden CFDE_TextOut::m_ttoLines.f181dc10a Roll Fuchsia SDK from 12.20230609.2.1 to 13.20230629.2.118db9a2ed Update bPrinting in RenderPageImpl()e293c0944 Add DEPS entries for reclient4b32534e4 Roll third_party/skia/ a5070bdfb..10a43e57e (512 commits)2699dfb71 Tweak some recently added Skia code205826cda Roll Fuchsia SDK from 12.20230601.1.1 to 12.20230609.2.1270f8d45f Replace android_ndk with android_toolchaincd2944e5e Roll buildtools/third_party/libc++abi/trunk/ b2e8ad275..8d21803b9 (4 commits)355f0a6a5 Roll third_party/icu/ 1eea59cab..e8c3bc9ea (5 commits)adcf1e728 Roll buildtools, libc++, and abseile3606af5b Roll buildtools/third_party/libunwind/trunk/ cd144ced3..f1c687e0a (3 commits)809e7441f Roll third_party/zlib/ 0cf42a259..f999826d2 (11 commits)8cf7e9a73 Roll base/allocator/partition_allocator/ f13adc396..ad18d83b7 (50 commits)937c751f3 Update gn_version to da5fe01bce4ae84b2619caca7a3aa7ec7d3eb8a71dba516f6 Roll third_party/depot_tools/ 79f13899e..064883063 (76 commits; 28 trivial rolls)334284851 Roll third_party/freetype/src/ 80a507a6b..e4586d960 (7 commits)d2c091d71 Roll tools/clang/ 0b83134b3..2cd52f556 (38 commits)4e9291f1c Roll build/ a12897e7e..c1a8cf672 (191 commits)3efe9dc53 Use multithreaded instead of apartment-threaded</details>
Commits between `4.17.0` and `4.18.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.17.0 and 4.18.0 (latest commit first):
f810b38 [autorelease] update changelog and version file8364457 packaging: also lower musllinux tag to 1_1</details>
<details> <summary>PDFium commit log</summary>
Commits between 5854 and 5868 (latest commit first):
505438b2c Add XPS support to pdfium_test49a42197d Move helpers to //samples/helpers7b8acbc28 Simplify FPDF_Render implementations037e72c6d Refactor ProcessPdf() and ProcessPage() statefbbdab86f Make "--diff" option handle reverse-byte-order results for pdfium_diffaefb13c5c Replace FPDF_RECORDER with FPDF_SKIA_CANVAS411f207af [Fuchsia] Replace downloading gn SDK with core SDKb1e534339 Roll build/ e100e80a1..a12897e7e (58 commits)0dbf91cb5 Enforce value ranges in IsIsoTimeFormat().c7df6021f Add GDI expectations1d404027e Add IsIsoDateFormat() and IsIsoTimeFormat() unit tests.b0254c934 Avoid computing unused values in IsIsoTimeFormat().d691f6ef3 Add missing nullptr check in CJX_Object::SetCDataImpl()14f97b232 Remove unused out params from IsIsoDateTimeFormat()8739c4c6f Fix millisecond check in IsIsoTimeFormat()5b115ea3f Remove unused out param from IsIsoDateFormat()21ac43e7f Roll tools/memory/ 1084fb884..57b3b9e7c (2 commits)36111e64c Fix search for colon in IsIsoTimeFormat()4b06202b3 Roll third_party/skia/ 029100f6e..a5070bdfb (152 commits)270bda14b Switch to NOTREACHED_NORETURN() in various core/ sub-directories8d645345a Better bounds-check in IsIsoTimeFormat()</details>
Commits between `4.16.0` and `4.17.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.16.0 and 4.17.0 (latest commit first):
343efeb [autorelease] update changelog and version file7ed7bb6 Inline saving implementation (#229)3e643cb Library init/destory nits98899a7 Roll back glibc req to 2_17 for now (CC #203, #231)f24e54e Revert a bad style change6607977 sourcebuild: roll win/pdfium.patchef2f2da Install safeguard to lock autoclose after lib destruction</details>
<details> <summary>PDFium commit log</summary>
Commits between 5841 and 5854 (latest commit first):
70c2db3e9 Add GDI renderer support to test_runner.py33b14f693 Add GDI renderer to pdfium_test7f2235ee9 Fix stack-overflow in CheckForSharedFormInternal()4d1379a8d Use NOTREACHED_NORETURN() in non-win32 core/fxge codec553157c2 Change enum CFX_ImageTransformer::StretchType to an enum classfbb42b8f0 Use PageRenderer::Write() for all output formats7b2f0e4dd Add --use-renderer support to test_runner.py6c2c8ce87 Revert "Don't implement CPDF_DIB::GetBuffer()"</details>
Commits between `4.15.0` and `4.16.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.15.0 and 4.16.0 (latest commit first):
5406fc9 [autorelease] update changelog and version file5739294 PIL buffer test: relax copy assert to warning5f2288a to_pil(): reflect image changes in bufferca7d701 bitmap.from_pil(): preserve RGBX872bf6b include bindings/*.py in sdist058014e bitmap comment: nitsd99bae3 readme: fix cffi link49b63b1 bitmap nit: improve version info13360db page: single line nits2ac239c Add return code check for FPDFPage_RemoveObject()5e7d954 init_forms(): further check correctiona88f65f Somewhat work on imports2f338e5 bitmap.from_pil(): Add option to re-copy046216e bitmap: improve code docs</details>
<details> <summary>PDFium commit log</summary>
Commits between 5827 and 5841 (latest commit first):
f608b5d3a Don't implement CPDF_DIB::GetBuffer()b8df4c36d Remove redundant MSVC 4267 warning3e0aca455 Add a pixel test for a trailer with the wrong /Size2c7354693 Tolerate bad /Size in V5 xrefs089adc52f Give CPDF_CrossRefTable::ShrinkObjectMap() a better name9256bd661 [Skia] Handle text scaling inside CFX_SkiaDeviceDrivere49db5b31 Update the constant used to limit xref size42f3930ce Add a ParserXRefTest test for wrong /Size relative to /Indexfd0b83c85 Add more ParserXRefTest test cases for /Indexb68545c09 Add more ParserXRefTest test casesf899df424 Change ParserXRefTest to use Gmock matchers7923337d2 Change some ParserTest to use a test fixture7b044178d Clean up ShrinkObjectMap() methods12f7dcb80 Document default type value in CPDF_Parser::ProcessCrossRefV5Entry()e70dfbc6b Memoize RealizeSkImage() in CPDF_PageImageCachee392794c0 Remove force_alpha parameter517bbe3dc Remove last reference to SkBitmap44b0492c7 Remove no longed needed .cookie from PartitionOptions initialization1b2a3b549 Roll base/allocator/partition_allocator/ b8014d77e..f13adc396 (28 commits)6e3e8502c Move alpha type conversion into RealizeSkImage()a4ec25d38 Cleanup at pdf fuzzer termination.d36799c75 Roll Code Coverage from de759c9da836 to 8ec74a909da4 (6 revisions)ba7701bc2 Roll Catapult from 730ebc3ef2f3 to f51324c1c818 (59 revisions)</details>
In helpers, closing a parent object now automatically closes the children to ensure correct order. This notably enhances safety of closing and absorbs
init_forms(), attempt to call FPDF_LoadXFA() and warn on failure, though as of this writing it always fails.
An upstream issue is suspected.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.14.0 and 4.15.0 (latest commit first):
4ca2bbc [autorelease] update changelog and version file9fe9660 nit: slightly improve repr style12d2327 Move library load/destory to seprate fileee14e56 utils.get_bufreader(): do not separately hold bufferd23cfab cli/imgtopdf: overwrite existing files6749177 bitmap.from_pil(): avoid one layer of copying5f2bd3f formal safety nits around formenvs5e19859 Further improve autoclose debugging6ed7685 autoclose: add context info77bf19a Combine namespaces bases, consts, utils into pdfium_i (#226)6aa3c7e fix init_forms() blunder: move version safety check to right place656f945 formenv: child-track pages released after init_forms()68854b2 readme: link case study concerning ABI vs API8f8edcf Update changelog_staginge5d348e Call FPDF_LoadXFA() in init_forms(), warn on error (#223)eb07605 Protect closing order (#224)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5813 and 5827 (latest commit first):
5e77cd172 Simplify CFX_DIBBase::RealizeSkImage()7ccc8ace2 Add CFX_DIBBase::RealizeSkImage()bee35d5e5 Avoid using NOTREACHED() in test codecfc8f9162 Don't infer UnownedPtr::ExtractAsDangling() type55e612f5f Manage Upsample() memory using SkImage7b3cd1e7f Remove obsolete third_party/android_sdk/6498464bc Fix PDF saving when multiple graphics states are in effectc261a6cb2 Fix FxgeSkiaEmbedderTest.RenderBigImageTwice test5281496be Minimize GN dependencies on //skia85412229e Replace FXFT_MM_VarPtr with ScopedFXFTMMVarfa84e52cd Remove FT_Done_MM_Var() workaround937e7c848 Tighten DEPS rules for Skia headersd2dcc316e Add include for SkTileMode</details>
Commits between `4.13.0` and `4.14.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.13.0 and 4.14.0 (latest commit first):
e011ddd [autorelease] update changelog and version file69b3880 docs: improve memory management section</details>
<details> <summary>PDFium commit log</summary>
Commits between 5799 and 5813 (latest commit first):
d00660e5c Move write APIs from CFX_DIBBase to CFX_DIBitmapaaa3ba68e Fix unnecessary GetWritableBuffer() callse5e0b281f Remove CFX_DIBExtractor1ea3e1cff Roll build/ 3c9055956..e100e80a1 (99 commits)6257fd324 Roll v8/ af40b3075..9888bdc17 (303 commits)a369e368a Roll buildtools, libc++ and abseil0804b03f8 Roll third_party/zlib/ 14dd4c445..0cf42a259 (3 commits)c618dbcfa Make CFX_DIBBase::GetBuffer() const-correctbb4e26d0b Roll base/allocator/partition_allocator/ 8551ae8bd..b8014d77e (36 commits)54b9cd1af Roll third_party/android_ndk/ 8388a2be5..310956bd1 (1 commit)6c1135190 Use //third_party/cpu_features:ndk_compat1e6257321 Limit the number of form XObjects within a form XObject9dc67f021 Add //third_party/cpu_features to DEPS14f58f559 Add CPDF_Form::RecursionState structd87685c20 Update gn_version to e3978de3e8dafb50a2b11efa784e08699a43faf8337e0a37d Update vpython3 requestsf59459617 Roll Fuchsia SDK from version:12.20230503.1.1 to version:12.20230601.1.1f2ebffd1b Roll buildtools/third_party/libc++abi/trunk/ 66967963e..b2e8ad275 (11 commits)2c1720e4b Roll buildtools/third_party/libunwind/trunk/ 88bd83fe0..cd144ced3 (6 commits)3c1b3cdcd Roll tools/clang/ 56556e9bb..0b83134b3 (35 commits)44f86322f Roll third_party/icu/ d8daa943f..1eea59cab (4 commits)8338cc09b Roll third_party/freetype/src/ be15811c4..80a507a6b (57 commits)eac64389d Roll third_party/depot_tools/ 13878e1f7..79f13899e (78 commits; 21 trivial rolls)53dcf78f7 Use newer gni file lists for Skiaf83b51220 Roll third_party/skia/ 6acd5a6fe..029100f6e (120 commits)e2c8eacbc Roll tools/memory/ 09f58c36c..1084fb884 (1 commit)13adebf3b Fix function pointer mix up in OpenJPEG72aa5fbd5 Fix function pointer mix up in LCMS314477963 Add smaller less-scary comment about FPDF_DestroyLibrary().</details>
Commits between `4.12.0` and `4.13.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.12.0 and 4.13.0 (latest commit first):
1dd22bf [autorelease] update changelog and version file6132aa5 Minor setupsrc changese4a1b0f version: add task2f982b4 readme: discuss drawbacks of ABI-level bindings</details>
<details> <summary>PDFium commit log</summary>
Commits between 5786 and 5799 (latest commit first):
6e653ec0c Add high-resolution re-rendering test72b051838 Add CFX_SkiaDeviceDriver(SkCanvas*) constructor88ad8bf36 Add big scary comment about thread unsafety to fpdfview.h.1f8d57863 Add unit test that operator New is shimmed onto BRP8277d6e96 Small tidy in CPWL_Wnd::SharedCaptureFocusState.eee36578b Rename CPWL_MsgControl to SharedCaptureFocusState and nest in CPWL_Wnd.28eb03ee8 Remove CPWL_Wnd::CreateScrollBar()8172e30fe Remove references to empty Skia "opts" GNI targets/files249ff515f Roll third_party/skia/ 5c93acf31..6acd5a6fe (263 commits)586ed826d Avoid dangling ptr in ~CPWL_MsgControl().4056a102f Rename RePosChildWnd() to RepositionChildWnd()753fad158 Add pixel test for non-ASCII text appearancesc72dad9f7 Avoid setting DiscardableMemoryAllocator in LLVMFuzzerTestOneInput()328edf32a Use noparent=True in //public/DEPS0b74b9a8f Forward declare ByteString in the custom gtest-printers.h</details>
Commits between `4.11.0` and `4.12.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.11.0 and 4.12.0 (latest commit first):
39c136c [autorelease] update changelog and version file9b2277e readme: shorten raw access paragraph9384715 packaging_base: update note</details>
<details> <summary>PDFium commit log</summary>
Commits between 5772 and 5786 (latest commit first):
4a5e28a78 Fix text string handling on UTF-32 platformsc4e6b7d3e Improve ParseDecodeTest cases for test strings448f3994d Deduplicate Gold properties code2bfcd7862 Merge UTF-8 handling into fx_string.cppd7e084ec3 Mark some dangerious pwl methods [[nodiscard]]4cffda0e4 Roll v8/ f66b0bc93..af40b3075 (821 commits)a248b67f7 Consolidate UTF-16 logicb6c2e82d2 Initialize only needed fields of PartitionOptions8ef742b1a Roll base/allocator/partition_allocator/ 096531f40..8551ae8bd (24 commits)4fcc240d3 change readme use_goma to false2c2634093 Fix duplicate shim symbols in chromium build8c8755d8f Fix GN visibility checks when building with chromium.d31d8a36d Roll build/ 64c99419f..3c9055956 (93 commits)bd861027b Use malloc shim for testing on all platforms (except win)d22b2a8d2 Make Retaintable subclass's ctors/dtor non-public5cdc452a1 Rename local thisObserved to this_observed29c665ea4 Observe CPWL_ComboBox across all On* methods059bddb09 Clean up CPDF_StructElement606df596a Make PDFium tests compatible with BRP-enabled allocators.c6a34d1ca Avoid redundant calls to get CFXJSE_Engine in CJX_Object::RunMethod()57c1ab247 Prevent dangling pointer in CPDF_StructTree::AddPageNode()1ea042cff Remove CollectionSize() use in CPDF_StructTree::LoadPageTree()4ff4ca9ab Support BackupRefPtr in PDFium.f722b54ef Roll Catapult from ac30cc4bc7d3 to 730ebc3ef2f3 (44 revisions)7884587b9 Roll Code Coverage from 9b51524c4f75 to de759c9da836 (1 revision)</details>
In PdfDocument.render(), fixed a bad bitmap.close() call that would lead to a downstream use after free when using the combination of foreign bitmap a
PdfDocument.render(), fixed a bad bitmap.close() call that would lead to a downstream use after free when using the combination of foreign bitmap and no-copy conversion. Using foreign bitmaps was not the default and expressly not recommended.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.10.0 and 4.11.0 (latest commit first):
f927f7c [autorelease] update changelog and version file1228d4e Update readme065bd1f Rename TODO(v5) to TODO(apibreak)0cfe906 Do NOT call bitmap.close() in renderer worker (see description!)e8ab921 Minor code comment fixes47161c6 rebuild bindings/raw.py5968b24 Update reuse/dep52c516db ctypesgen: conditionally pass --no-srcinfo (fixes #215)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5758 and 5772 (latest commit first):
78a55892d Use some spans in CFX_CTTGSUBTable948a8b484 Avoid using FT_Bytes in CFX_CTTGSUBTabled204feb0b Fix nits in CFX_CTTGSUBTable59870bf72 Remove struct CFX_CTTGSUBTable::TCoverageFormat*40485aacb Combine struct CFX_CTTGSUBTable::TSubTable*15c1b6743 Fix pdfium::span<> tests under BRP's asan_use_unowned_ptr=trued699e177c Remove struct CFX_CTTGSUBTable::TDevicefb2f71da3 Remove redundant calls to GetScriptContext()4e730a7d0 Prove some calls in XFA to GetScriptContext() are redundant80b01ad64 Clean up struct CFX_CTTGSUBTable::TFeatureRecord and TLookup8fd980a39 Remove struct CFX_CTTGSUBTable::TScriptRecorde60fa0d7d Remove struct CFX_CTTGSUBTable::TLangSysRecord7b49936bc Stop storing CFX_Font::m_pSubData3f1624a82 Improve error handling in CPDF_CIDFont::GetGlyphIndex()a9ff918a8 Observe widget across SetOptionSelection() calls.3eb3c4d77 Always check return code from CPWL_ComboBox::SetPopup().0fa0c4f3e Save dash array and phase of GraphState in CPDF_PageContentGenerator4c16842f6 Roll Skia and update SkSurface calls09126b95a Enable raw_ptr usage enforcement for PDFium.dc12ace76 Add UNOWNED_PTR_EXCLUSION to mac-specific CFX_AggDeviceDriver member.e37bff1a0 Use "Chrome Symbol" font on all platforms aside from Windows2ccdc331a Fix mac build under raw_ptr plugin92a5bc33e Fix a CHECK() failure in ObjectTreeTraverser::GetReferenceEntries()1918c8da8 Fix Skia build under pdf_enable_unowned_ptr_exclusion1ce0f0424 Unblock roll of PDFium into chromiumeaa68be67 Resolve remaining unowned_ptr exculsion warnings [android, win].e6895bd32 Resolve remaining unowned ptr exclusion warnings.d6bc7c46a Fix some unowned ptr exclusions in core/fxcrt/{xml,css}530d0170f Suppress unowned ptr exclusions in embeddertests431f9a92e Support iterating over WideString by code pointef937a25a Exclude public files and test files from raw ptr checksa8e77a12d Fix unowned ptr exclusions in core/fpdfapi578fe5b2a Fix common unowned ptr exclusions in core/fxcrtbe511372f Introduce raw ptr exclusion enforcement to PDFium.7ef2ee356 Teach googletest about C-string to ByteString comparisons401a247da Remove CPDF_Image::GetDocument() nullptr checksd77c93540 Support encoding unpaired surrogates</details>
Updated PDFium from 5758 to 5772 .
In PdfDocument.render() , fixed a bad bitmap.close() call that would lead to a downstream use after free when using the combination of foreign bitmap and no-copy conversion. Using foreign bitmaps was not the default and expressly not recommended.
Commits between `4.9.0` and `4.10.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.9.0 and 4.10.0 (latest commit first):
59fe713 [autorelease] update changelog and version file5028df4 readme: update/fix raw API section (CC #217)58028fd textpage nits970914b Further condense code (CC #212)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5744 and 5758 (latest commit first):
075ddba7c Teach googletest how to pretty-print WideString77b1258e9 Teach googletest how to pretty-print ByteString7014c95ee Handle non-BMP code points for UTF-16 wchar_tc651b5492 Clean up the UTF-8 encoder and decoder09e030db2 Use more const pointers in CPDF_Image::FinishInitialization()5afdf9323 Roll Fuchsia SDK from version:12.20230330.3.1 to version:12.20230503.1.16afd7a2aa Roll third_party/freetype/src/ b0a4f9927..be15811c4 (22 commits)112428105 IWYU: add cstdint for uint8_t in fxcrt::UnownedPtr7058fd4eb Roll buildtools/third_party/libc++abi/trunk/ 4a9d0560b..66967963e (15 commits)c92f25f84 Roll tools/clang/ f68624726..56556e9bb (24 commits)63ac35e1f Roll build/ c44ccbfc0..64c99419f (202 commits)f76d5cc22 Roll third_party/zlib/ b890619bc..14dd4c445 (2 commits)45f021e40 Roll buildtools and libc++327270525 Roll base/allocator/partition_allocator/ 118936d67..096531f40 (25 commits)d26d26f7c Update gn_version to git_revision:5a004f9427a050c6c393c07ddb85cba8ff3849fa26e7d6670 Roll tools/memory/ 13f0b81ce..09f58c36c (2 commits)69ed9d8a1 Roll third_party/skia/ ad459a5b8..7c6bd2a63 (486 commits)ca87479d6 Roll buildtools/third_party/libunwind/trunk/ f3464caa6..88bd83fe0 (22 commits)e5e8a16e8 Roll third_party/icu/ 1e49ac26d..d8daa943f (3 commits)fa00f6ee9 Roll third_party/depot_tools/ ab117384e..13878e1f7 (69 commits; 17 trivial rolls)833105422 Roll third_party/abseil-cpp/ 20c8ae002..c7a526044 (7 commits)</details>
Commits between `4.8.0` and `4.9.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.8.0 and 4.9.0 (latest commit first):
33e1c37 [autorelease] update changelog and version file47fdab0 document: add taskbde4e91 Make extract_images CLI slightly more memory efficient0f252d3 Mainly abbreviate bitmap init codea6e3c71 Further strip pageobjects code26cc610 tile: slightly improve styleb7cb474 pageobjects: code style improvements (more one-liners)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5731 and 5744 (latest commit first):
c4b31543f Don't re-encode annotation /Contentsc207ee2c3 Enable -Wcovered-switch-default0703e0486 Avoid -Wcovered-switch-default errors in various placese0277e268 Avoid -Wcovered-switch-default errors in //core codef9fb18307 Avoid -Wcovered-switch-default errors in XFA codebcd9d08ed Remove some unreachable code in CPDF_DataAvail5d675f6fd Add a pixel test for Type 3 font with a pattern48468f15d Fix defines in testing/fuzzers/BUILD.gn66608c815 Remove unnecessary Clear() operations2e68465df Mark Apple-only code inside cfx_glyphcache.cpp as such875e85008 Rewrite MaybeOwned<> in terms of absl::variant<>1e9e67f49 Thwart move-elision on MaybeOwned<T>::Get() invoked on rvalues.da4829cbc Define BUILD_WITH_CHROMIUM for pdfium fuzzers22980b302 Fix some nits in CFX_GlyphCache</details>
PdfTextPage.get_rect(): Added missing return code check and updated docs regarding dependence on count_rects(). Fixed related test code that was broke
PdfTextPage.get_rect(): Added missing return code check and updated docs regarding dependence on count_rects().
Fixed related test code that was broken but disabled by accident (missing asserts). Thanks to Guy Rosin for reporting {issue}207.PdfImage.get_size() wrapping the new pdfium function FPDFImageObj_GetImagePixelSize(), which is faster than getting image size through the metadata.build_pdfium.py --use-syslibs: Changed sysroot="/" (invalid) to use_sysroot=false (valid). This allows us to remove a botched patch.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.7.0 and 4.8.0 (latest commit first):
0c1a20d [autorelease] update changelog and version file24fbf07 Rename variable success to ok across the tree5b4d44f unsp: change handling of attachment92ab6dd Add bindings to & use FPDFImageObj_GetImagePixelSize()e418360 A few style improvements (CC #212)82d2a12 sourcebuild: move use_sysroot=false to linux section6bfb440 syslibs build: replace sysroot="/"+patch w/ use_sysroot=false0c17bcc Possible solution to #207dea9c70 Remove a task (CC #205)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5715 and 5731 (latest commit first):
9db61cf2d Set up DiscardableMemoryAllocator for pdfium fuzzer379bfc96b Added faster method for getting the size of an image object.f51e7a1cf Cache font widths in CFX_GlyphCache40f98eb42 Implement CFX_SkiaDeviceDriver::GetClipBox()594190814 [Skia] Use source rectangle passed to SetDIBits()0e8a8c6e5 Update NOINLINE definitionaf3848d11 Delete unused macros from compiler_specific.h3f0996155 Represent fxcmap::CMap::MapType with a boolda78dcba4 Change fxcmap::CMap::MapType an enum class with properly named values5bb3a5ac2 Put FXCMAP code in namespace fxcmap357729f1d Consistently use #if defined(_SKIA_SUPPORT_)2bd5d5761 Avoid passing nullptr to vswprintf() inside WideString::FormatV()cffe2384b Remove a spurious RetainPtr in the CFX_DIBExtractor ctor2327115fd Get rid of a Windows-only -Wno-switch flag5dfeac1e0 Fix roll-freetype.sh on Linux409e3e252 Fix -Wswitch warning in cfpf_skiafontmgr.cppff7e020b9 Add build_config.h to core/fxcrt/fx_extension.h9a89e728d Update metadata in third_party/freetype/README.pdfium5e106987a Roll Code Coverage from b0f9daa5b3f5 to 9b51524c4f75 (1 revision)f66276f2e Roll Catapult from c9f4f650cdee to ac30cc4bc7d3 (48 revisions)</details>
`ecd8c3b` Plan an API-breaking change
PdfPage.remove_obj() wrongly retaining the page as parent in the finalizer hierarchy.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.6.0 and 4.7.0 (latest commit first):
fb71777 [autorelease] update changelog and version fileef7cd16 Update tasks/planned_changesd154911 Update changelog_stagingecd8c3b Plan an API-breaking change5f2971c cli/toc: use ifexprc2215f1 history: slightly improve wording0571269 matrix eq: improve var name5622f77 PdfPage.remove_obj(): avoid capturing previous parent in finalizer5e8271b Correct a readme example (CC #204)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5705 and 5715 (latest commit first):
d127a657b Remove stale comment from cpdf_hint_tables.h900791224 Remove lcms patches to cmsDupToneCurve()ca3e52a5e Upgrade to lcms 2.155a1e12b47 Use NOTREACHED_NORETURN() in core/fxcodec</details>
Updated PDFium from 5705 to 5715 .
Fixed PdfPage.remove_obj() wrongly retaining the page as parent in the finalizer hierarchy.
Commits between `4.5.0` and `4.6.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.5.0 and 4.6.0 (latest commit first):
41dff5d [autorelease] update changelog and version filedb33c55 Sync windows patch with pdfium-binaries3099498 Improve comments on page object insert/removef4eb3c7 bases: update comment562b65a Attempt to fix changelog rendering on RTD25732ec Enable forms test for V8 builds</details>
<details> <summary>PDFium commit log</summary>
Commits between 5692 and 5705 (latest commit first):
850454b6e Remove duplicate FXFT_Get_Glyph_Outline definitiondcfaca583 Roll build/ ff3e22160..c44ccbfc0 (116 commits)c7fe5d2ce Avoid rendering JPX image with mismatched PDF color space entryc0a089da7 Add a pixel test for JPX images with mismatched color spaces27f3c71ff Update pdfium_test filename generation to give helpful message5fb466ed5 Use helper functions to generating pdfium_test output filenamesb913afffd Check resources dictionaries more closely in FPDFEditEmbedderTest0d00221f2 Roll build/ 1da99af9b..ff3e22160 (121 commits)5bb3f5614 Roll tools/clang/ 2a7073518..f68624726 (19 commits)216c392c6 Update gn_version to git_revision:41fef642de70ecdcaaa26be96d56a0398f95abd48b6873e84 Roll v8/ 8a4efd3df..f66b0bc93 (509 commits)a1e3d2bf3 Roll Fuchsia SDK from version:11.20230306.1.1 to version:12.20230330.3.1a9e33b5d2 Roll buildtools and libc++31bc914fb Fix Fuchsia build with Skia enabledaf26f61e6 Fix a span CHECK() failure in RgbByteOrderTransferBitmap()5d9acaac1 IWYU: add stdint.h for uint32_t pdfium::annotation_flagsdabf13f6e Roll third_party/abseil-cpp/ 28c6deaca..20c8ae002 (5 commits)ac895975f Roll third_party/freetype/src/ d874ffa96..b0a4f9927 (44 commits)1f2240306 Roll tools/memory/ b55593f4d..13f0b81ce (1 commit)415349ec8 Roll third_party/libpng/ 20d2554f8..805df541c (1 commit)e509a6046 Roll base/allocator/partition_allocator/ 22b087c8b..118936d67 (44 commits)077aa8c26 Roll buildtools/third_party/libunwind/trunk/ 7b03cc568..f3464caa6 (8 commits)e34f0d336 Roll buildtools/third_party/libc++abi/trunk/ cff1f2def..4a9d0560b (14 commits)8856083df Roll third_party/depot_tools/ 424814829..ab117384e (84 commits; 31 trivial rolls)8e5630ca0 Roll third_party/libjpeg_turbo/ 0b6e6a152..aa4075f11 (1 commit)ef3020027 Do copy-on-write in CPDF_PageContentManager692f0719e Do copy-on-write in CPDF_PageContentGenerator31f23b926 Split CPDF_PageContentGenerator::UpdateContentStreams()f4b3342ca Roll third_party/zlib/ 90e67ba3f..b890619bc (5 commits)6c3577ca2 Add RemoveTextObjectWithTwoPagesSharingResourcesDict test case02516521c Remove a duplicate FPDFEditEmbedderTest test casec16abfd66 Roll third_party/skia/ d10098c22..ad459a5b8 (92 commits)</details>
[pdfium-binaries#105]: https://github.com/bblanchon/pdfium-binaries/issues/105
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.4.0 and 4.5.0 (latest commit first):
3348f21 [autorelease] update changelog and version filed494c25 Somewhat address the previous fixme8732642 bases: add fixmed5bceb7 pageobjects: nit0e5a362 build: add use_system_libtiff219509d Update changelog4c3d00f Update init_forms()</details>
<details> <summary>PDFium commit log</summary>
Commits between 5677 and 5692 (latest commit first):
97af73090 Add use_system_libtiff build option9b9bf7539 Keep track of ExtGState resources69703b37c Keep track of Font and XObject resources28f8db4c0 Avoid generating PDFs with unreferenced objects01b85b79a Add object tree traversal utility functions1e5dee361 Save the trailer's object number when parsing0a6944ead Explain how CPDF_Object worksf6bac94bd Add fallback color space check when choosing JpxDecodeAction01ea024b7 Add RemoveTextObjectWithTwoPagesSharingResources test4d48929e3 Check for removed resources in saved output in RemoveTextObject test1f4904f68 Test trailer generation in FPDFSaveEmbedderTest.SaveLinearizedDoc5018240eb Add some using statements in fpdf_save_embeddertest.cpp06a0689d4 Encapsulate more in CPDF_PageContentManager0a1116093 Switch CPDF_PageContentManager to have a CPDF_Document pointerf3d0f929f Add RemoveTextObjectWithTwoPagesSharingContentArrayAndResources test469cc8f79 Roll Skia and use new SkImages factory and gni files1233727e1 Devirtualize CPDF_Object::CloneDirectObject()01288cd99 Use NOTREACHED_NORETURN() in core/fpdfapi/page4e8a0feaa Fix nits in cpdf_pagecontentmanager.h49e4f4484 Rename JpxImageInfo::components to JpxImageInfo::channels5cd3d908b Update third_party/base/numerics</details>
Updated PDFium from 5677 to 5692 .
In pdfium-binaries, forms init for V8/XFA enabled builds was fixed by correctly setting up XFA on library init (see pdfium-binaries#105 ). Updated pypdfium2’s support model accordingly.
Commits between `4.3.0` and `4.4.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.3.0 and 4.4.0 (latest commit first):
4018c9c [autorelease] update changelog and version fileae7d739 bitmap: slightly improve docs4bbae67 pageobjects: remove ridiculous if expressionb5a97fc setup/pkg_base: add dev note15c5562 bases: add task7019e67 add note on musl task0a158b5 [ws only] reformat packaging_base header6df39f1 Slightly polish setup.pyc519024 document: add task71a0a63 Add reference bindings (closes #192) (#196)7bb3549 Transfer ownership of ctypesgen fork (closes #194)e285802 MANIFEST.in: add missing word in comment</details>
<details> <summary>PDFium commit log</summary>
Commits between 5664 and 5677 (latest commit first):
aae3f4452 Simplify pitch calculation in CFX_DIBitmap::CalculatePitchAndSize()a59704451 Add a pixel test for axial shading7bfe65fa5 Add RemoveTextObjectWithTwoPagesSharingContentStreamAndResources test22614014f Clamp rectangle values in FindTextlineFlowOrientationab00c1bc9 Use SkPackARGB32NoCheck() instead of SkPackARGB32()a066864b6 Remove unnecessary Clear(0) from CPDF_RenderStatus3f80d9332 Make SkBitmap immutable before asImage()9286281aa [Skia] Support pre-multiplied MultiplyAlpha()168d065ea Clarify what CPDF_PageObject isef71e9ae3 Do more checks in a FPDFPage_RemoveObject() test2dee06f04 Remove a toolchain workaround in FPDF_NewFormObjectFromXObject()b4357750c [Skia] Add methods to force pre-multiplied stated914c5fe1 Avoid overloading CPDF_StreamContentParser::AddImage()22d7c0733 Do less work in CPDF_PageContentGenerator when there are no streams15b1203da Use NOTREACHED_NORETURN() in fpdfsdk99dbaf4f6 Implement NOTREACHED_NORETURN()d75dded3f Sync third_party/base/immediate_crash.h with Chromium copy8bc8377e8 Add MultiplyAlpha() API to CFX_RenderDevice867f7e996 Roll Catapult from 6234cc4e018d to c9f4f650cdee (57 revisions)5e426ab5c Roll Code Coverage from 67720beda1c7 to b0f9daa5b3f5 (3 revisions)45d010567 Add pixel test for transparency group compositing</details>
Fixed forms rendering in the multi-page renderer by initializing a formenv in worker jobs if the triggering document has one.
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.2.0 and 4.3.0 (latest commit first):
e99eb07 [autorelease] update changelog and version filefa29f02 further nits6ccc681 cli: style nits6df5b7c utils.is_buffer: nits5362ef3 Update changelog styling59f7108 PdfDocument.page_as_xobject(): clarify exception msg2979a6c unsp: initialize var with None0167ad4 docs: order CLI modules alphabetically994e148 shell api: add attachments clia013940 Continue on 9b16f75 as planned9b16f75 Revert "Continue on 260140b / c2d4a17 (CC #191)"abed2ec changelog: add notee39b8ba Attempt to fix RTD build4d25bb2 Continue on 260140b / c2d4a17 (CC #191)c2d4a17 Update task260140b Start fixing forms rendering in multipage renderer</details>
<details> <summary>PDFium commit log</summary>
Commits between 5648 and 5664 (latest commit first):
dcb27a396 Trim third_party/base/bits.hafdb7cbdb Sync third_party/base/no_destructor.h with the Chromium copy54a61350f Remove unused STL includes15ee367a7 Add a new test for rendering JPX imagesf5057c75a Roll third_party/instrumented_libraries/ 87467200f..0f536d22d (10 commits)97f66c181 Unsuppress TimeField.pdf3f9c5f10e Update the matching entry for formfeild.pdf in suppression listf44118bb1 Unsuppress Mac Skia tests35bf2da24 Unsuppress format_custom_format.pdf5b81b29a8 Update documentation for FPDFBitmap_GetBuffer()2821a5034 [Skia] Remove DebugVerify*IsPreMultiplied() callsde5e3799e [AGG] Add more pixel tests for out-of-bounds coordinate lines3095afdd6 Add more helpers to deal with variable length fields in cpdf_parser.cppd3fb7d00e Revert "Enable cppgc plugin for pdfium"9634d4940 Roll testing/corpus/ 746093a2b..62a96ab80 (1 commit)9140e3ff7 Enable cppgc plugin for pdfium02beb5f6b Roll v8/ b1f01d3ab..8a4efd3df (590 commits)7dc8aeb39 Roll third_party/skia/ f9c77b544..0012a5e84 (163 commits)ca3a9c297 Roll third_party/abseil-cpp/ cd843b25b..28c6deaca (9 commits)14f88c511 Tidy class TreeNode.ab486ae8d Use CRTP idiom to avoid cppgc plugin warnings in TreeNode.d32298341 Add tests for optional /JPXDecode parametersd611f5db9 Add basic /JPXDecode test casesa4669f7b8 Add OWNERS file for skia subdirectory7f2d281eb Roll skia and change SK_SUPPORT_GPU -> SK_GANESH</details>
Updated PDFium from 5648 to 5664 .
Fixed forms rendering in the multi-page renderer by initializing a formenv in worker jobs if the triggering document has one.
API-breaking changes around forms code, necessary to fix conceptual issues. Closes {issue}182.
182.
may_init_forms parameter replaced with init_forms(), so that a custom form config can be provided.
This is particularly required for V8 enabled PDFium.formtype attribute replaced with get_formtype().
Previously, formtype would only be set correctly if may_init_forms=True,
which caused confusion for documents that have forms but no initialized form env.PdfPage.get_*box() functions now provide an option to disable fallbacks. Closes {issue}187.pypdfium2.internal.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.1.0 and 4.2.0 (latest commit first):
ae25d31 [autorelease] update changelog and version filee77c8c2 get_bufreader() skip a tell() call74849ad pdfinfo: nitf4f93f6 somewhat fix autoflake compliance47eed2b forms rendering test: improve code stylee7b82bb Update tasks7904984 Make get_metadata_dict() slightly nicerb3ff4f6 pdfinfo: inline helper function into main()dadbe01 Misc doc nitsef13095 PdfPage.get_*box(): Make fallback optional (fixes #187)86e8cb7 docs/python_api: note new internal API275ffb3 fix typo3171a37 PdfObject: remove some isinstance checksd4d98d5 PdfDocument: Restructure forms code0100cd4 internals: remove docs212e4dd Somewhat expose internal API45cec58 setup.py: rm unnecessary return</details>
<details> <summary>PDFium commit log</summary>
Commits between 5633 and 5648 (latest commit first):
caf4ce163 Ensure {{include}} output ends on its own line6df67a765 Make CFXJS_PerObjectData constructor private.e6113f28d Store global proxy object in CJS_Document1c6ab7fa5 Fix CPPGC Plugin warnings for PDFiumce0337c08 [Skia] Remove redundant DrawDeviceText() branchesc4e67dc29 Remove SkiaState05293b016 Inline SkiaState::DrawPath()f6f88fc87 Remove clipping operations from SkiaStatee78b73593 Roll Fuchsia SDK from version:11.20230202.3.1 to version:11.20230306.1.152f6c6098 Enable C++20 for Fuchsiac4a35e9cc Remove "temporary" SkiaState fields7bac6ae44 Remove SkiaState::m_drawMatrix68cac2f06 Remove CFX_SkiaDeviceDriver::Flush()c1dee3ae8 Roll build/ f8777b60d..1da99af9b (48 commits)defd00cdc Roll tools/clang/ 59d4a6deb..2a7073518 (6 commits)7a0dece3a Get code coverage for CPDFSDK_Widget::Synchronize()5471c3078 Eliminate support for lazy SkiaState flushesfb5325380 Do early return to CPDF_PageContentManager::ExecuteScheduledRemovals()2a43d47fb Use absl::variant in CPDF_PageContentManager8a87da2cf More tightly validate XML names in CXFA_FFDocView::GetWidgetByName()7ea7c90ea Make CPDF_PageContentManager::ExecuteScheduledRemovals() privatefbd5dcdc4 Support indirect objects for /Filter arrays359cbde94 Make CXFA_FFPageWidgetIterator CPPGC_STACK_ALLOCATED703e42226 Simplify CPDF_StreamContentParser::Handle_SetFont()f8a1e5f5b Roll buildtools/third_party/libc++abi/trunk/ b74d77161..cff1f2def (9 commits)734822fb1 Roll buildtools and libc++63e3719f1 Observe CPWL_* object destruction across CPDFSDK_Widget methods2da56e26f Roll buildtools/third_party/libunwind/trunk/ e95b94b74..7b03cc568 (10 commits)82473b67e Update resultdb_version to git_revision:ebc74d10fa0d64057daa6f128e89f3672eeeec95eec0143e7 [Skia] Eagerly flush text52bc7bd48 [Skia] Eagerly flush paths922ceb17d Move CXFA_EventParam::m_pTarget into CFXJSE_Engine74b865949 Regenerate Skia expectation for bug_1963.in168173ce1 Enable xfermodes{2,3}.pdf tests for Skiaf5756d30d Roll Skia7f37dc2d2 Add support for per-test fuzzy matching0bac03976 Roll tools/memory/ 930bae8b2..b55593f4d (1 commit)597d4c21e Add fuzzy matching to pdfium_diff38756a395 Roll third_party/skia/ 215b0bcad..7e2c9f54c (1 commit)</details>
Updated PDFium from 5633 to 5648 .
API-breaking changes around forms code, necessary to fix conceptual issues. Closes #182 .
may_init_forms parameter replaced with init_forms() , so that a custom form config can be provided.
formtype attribute replaced with get_formtype() . Previously, formtype would only be set correctly on formenv init, which caused confusion for documents that have forms but no formenv was initialized.
PdfPage.get_*box() functions now provide an option to disable fallbacks. Closes #187 .
Some formerly hidden utilities are now exposed in the new namespace pypdfium2.internal .
Commits between `4.0.0` and `4.1.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 4.0.0 and 4.1.0 (latest commit first):
31ce921 [autorelease] update changelog and version filea461b9c Attempt to address #184b7f10fc update v4 changelog2bf200a update_pdfium: actually fix tar vuln false negativese0e53ba cli/version: fix possible double space25fda69 Slightly polish docsd4b3e24 Make use of sphinx-issuesac75249 somewhat simplify extract_text cli41c8298 changelog: rephrasea428b0f version: fix commentf4be3c7 readme: nits20bd36c setup: remove check_depse93af95 nitsfcd3d4b Have may_init_forms default to False3eda6d1 Start working on #182</details>
<details> <summary>PDFium commit log</summary>
Commits between 5619 and 5633 (latest commit first):
f9a00f86c Roll base/allocator/partition_allocator/ bb821f990..22b087c8b (40 commits)1cdd3207d Roll third_party/skia/ 5935b0dc4..215b0bcad (16 commits)04e76e408 Update gn_version to git_revision:fe330c0ae1ec29db30b6f830e50771a335e071fbc73d784b6 Roll base/trace_event/common/ 05a225a3e..147f65333 (1 commit)d71a97249 Roll third_party/zlib/ 2d44c51ad..90e67ba3f (2 commits)eba6b007e Roll third_party/freetype/src/ 646cc8ef8..d874ffa96 (36 commits)cffa6ad2b Roll third_party/depot_tools/ 963e01c76..424814829 (60 commits; 23 trivial rolls)623df7e06 Roll third_party/icu/ 2c51e5cc7..1e49ac26d (8 commits)140c14e52 [Skia] Flush after drawing soft mask dictionary44910af4e Improving test equality checks to use _NE and _EQ in fx_bidi_unittest.cppc1ce4c495 Improve RTL support for numbers with separatorsf9562f5d1 Remove //:gn_visibility carve out.</details>
Updated PDFium from 5619 to 5633 .
The PdfDocument parameter may_init_forms is now False by default.
Full support model rewrite. Many existing features changed and new helpers added. Numerous bugs fixed on the way. Read the updated documentation to mi
pypdfium2.raw).
Moreover, the raw API bindings do not implicitly encode strings anymore (pypdfium2 is now built with a patched version of ctypesgen by default).pathlib and f-strings.<details> <summary>pypdfium2 commit log</summary>
Commits between 4.0.0b2 and 4.0.0 (latest commit first):
cd79ac2 [autorelease] update changelog and version filea6d43a7 update_pdfium: fix tar vuln false negatives (e. g. '/dest', '/dest2')369af47 Fix unused imports in setup_base00ae082 attempt to fix autorelease5d4bc43 Revert "test_sourcebuild: combine regular and syslibs build"f16d461 test_sourcebuild: combine regular and syslibs buildadd0c4c test_sourcebuild: attempt to add syslibs build testing750805f setup.py: move v8 status creation where it belongsd4f784f update_pdfium: add emplace option9a1d2e2 update_pdfium/setup: start working on V8 supporte393835 Rework PDFium version handlinga83b303 gh_pages wf: nit4fa259a Consistently get pages using index access28e87bb Re-schedule workflow to Tuesday2ba08e2 readme: note code contributors graph97631f3 Fix reuse lint on release workflow44bf803 autorelease: attempt to fix commit log9bc2c7c update_pdfium: improve note on path traversal899cacc build wf: also move install step5b8b016 build workflow: move test step9786f0c build workflow: comments3424202 build_pdfium: windows fixa76651a Port setup code to pathlib (#181)ea5a55e page: add renderer tasksa98cb78 Further f-stringsddcc5f2 Rename pl_setup to pypdfium2_setup42d0f19 Start porting src/pypdfium2/ to f-strings (where appropriate)c0e3ca0 Rename craft_wheels to craft_packages48cfca5 build_packages/test: download all packages for simplicity31fc5ba nits4cea0ce textpage: add consecutive optionab72fe5 docs: nit0e6d624 Attempt to fix RTD build4bdb6db Attempt to fix test_release workflowcc300fa Revert "suspend schedule"3d49517 autorelease: comment nit</details>
<details> <summary>PDFium commit log</summary>
Commits between 5579 and 5619 (latest commit first):
f3b685793 Make more dictionaries const in fpdf_signature.cpp97a5abdc3 Use more form field constants in fpdf_signature.cppaa2ec3591 Roll v8/ 8256e3617..b1f01d3ab (78 commits)676f921fd Update a pixel test to render the black image more visible.96aa3bff6 Update yapf style from "chromium" to "yapf"ca7b98bb1 Add a test case fo indirect references in a /Filter array8efda5c1d Define enable_safe_libcxx in build_overrides/build.gni.bf5900a3c Remove 1_matrix.pdf from the suppression list for Skiab2ac55750 Remove the renderer filter in the suppression list for bug_1973.in0c3dbb0d2 Roll build/ ae79e7228..f8777b60d (111 commits) and tools/clang/ 44e5e39a9..59d4a6deb (13 commits)8d2d3732f Drop 11.pdf from the suppression list.5ff5d508b Speculative change for SEGV above CFXJSE_Context::ExecuteScript()5be0603fa Set SkPaint stroke width to 0 to guarantee drawing hairline.0e8db7578 Remove 2_halftone.pdf from the suppression list.f8963b1c1 Drop obsolete Skia suppressionsbad2c6c8f Roll Catapult from c4e9d16032d8 to 6234cc4e018d (89 revisions)f3e449bc6 Roll Code Coverage from aa4af3749029 to 67720beda1c7 (5 revisions)807692bc8 Move PaintStroke() out of CFX_SkiaDeviceDriver class3ec4d6508 Update the CFX_FillRenderOptions used for flushing paths0c2edd779 [Skia] Remove 8-bit to 8-bit image pathb4e947272 Add pixel test for 8-bit image scalinga29e1163a Reuse expectations in --regenerate_expectedc5387b9b1 Fix a potential OOB read in CFX_SkiaDeviceDriver::DrawShading().b4aca121f Remove some casts in CFX_SkiaDeviceDriver::DrawShading().5a11be4de Unsuppress quick_start_guide.pdf for Skia4d72bba69 Replace SK_ARRAY_COUNT with std::size2b0ac1b3e Tighten expected image selectione695ce1c8 Fix implicit libc++ includes in PDFiumba4fe4239 Delete more unused image test expectationsaf575457f Compile in whatever C++ version is default.3286ac3dc Delete unused image test expectationsfa70cfe37 Fix an integer overflow in CFX_Path::GetBoundingBoxForStrokePath()28dea1466 Improve --regenerate_expectedd94e996d0 Fix rendering of stencil mask painted with tiling patternsb09ef8afc Roll v8/ 65852f336..8256e3617 (654 commits)2ef13c353 Fix an issue that a 0-length round-cap path was not rendered48c36d4bc Roll third_party/skia/ ee68f3edf..5935b0dc4 (33 commits)974ff9e1d Remove a stale source file entry from skia/BUILD.gn.9fc138cb6 Roll third_party/skia/ 6c113cb8d..ee68f3edf (416 commits)d1ccefa22 Add a pixel test for 0-length paths.613dd306e Update ninja_version to version:2@1.11.1.chromium.6</details>
Full support model rewrite. Many existing features changed and new helpers added. Numerous bugs fixed on the way. Read the updated documentation to mi
pypdfium2.raw).
Moreover, the raw API bindings do not implicitly encode strings anymore (pypdfium2 is now built with a patched version of ctypesgen by default).<details> <summary>pypdfium2 commit log</summary>
Commits between 4.0.0b1 and 4.0.0b2 (latest commit first):
58a2149 [autorelease] update changelog and version filecdbcb31 autorelease: add task22de783 Edit changelog27f7b1c release control: keep beta36f6fbd Switch to requirements files58a5cbf Attempt migration to pyproject.toml8cb95b0 suspend schedule</details>
Commits between `3.21.0` and `3.21.1` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.21.0 and 3.21.1 (latest commit first):
604c582 [autorelease] update changelog and version file1706c5d workflows: drop python 3.68828b21 readme comment: fix order of searcher.get_next() result (#174)</details>
Commits between `3.20.1` and `3.21.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.20.1 and 3.21.0 (latest commit first):
6514939 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5567 and 5579 (latest commit first):
4f5038d08 Roll buildtools, libc++/libc++abi, and abseil-cpp9de35bc5c Use a stable sort to rank XFA font candidates064da5387 Roll third_party/zlib/ 18d27fa10..2d44c51ad (5 commits)907fb2cf1 Roll third_party/freetype/src/ ace97a02a..646cc8ef8 (29 commits)0d637fa95 Update resultdb_version to git_revision:ac21cf9883af7d1bf6d60e8a7448918eb3b6aa182bc0e2b3a Roll third_party/depot_tools/ 5b0c93402..963e01c76 (88 commits; 13 trivial rolls)c9c139aff Roll third_party/libjpeg_turbo/ ed683925e..0b6e6a152 (1 commit)8961defcf Roll base/allocator/partition_allocator/ 85f9e65df..bb821f990 (10 commits)2997b101a Roll buildtools/third_party/libunwind/trunk/ 5e22a7fe2..e95b94b74 (2 commits)70583a9f2 Roll base/trace_event/common/ 521ac34eb..05a225a3e (2 commits)515651e88 Roll third_party/nasm/ 0873b2bae..7fc833e88 (3 commits)4235f4ce9 Roll tools/memory/ 5d2efcc93..930bae8b2 (4 commits)be7e92f0f Roll Fuchsia SDK from version:11.20230103.1.1 to version:11.20230202.3.133cb4f0c1 Update gn_version to git_revision:84c8431f3e03cc6226c59dd49637c15ea31169a1a5ec3a4a1 Avoid a potentially dangling pointer in CPDF_PageImageCache.bac72b00c Roll build/ 46f1d3482..ae79e7228 (203 commits)936ec3fe8 Roll tools/clang/ 3b54a131a..44e5e39a9 (24 commits)a30e656e2 Update libtiff from 4.2.0 to 4.5.0.1c95623be Add a pixel test for masked image filtering</details>
Commits between `3.20.0` and `3.20.1` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.20.0 and 3.20.1 (latest commit first):
8cc9c0d [autorelease] update changelog and version filec1d90a9 workflows/trigger: deactivate pre_test stepd020641 autorelease: add taske895633 Attempt to fix sourcebuild on Windows (closes #171)</details>
Commits between `3.19.0` and `3.20.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.19.0 and 3.20.0 (latest commit first):
0b46745 [autorelease] update changelog and version file70879c4 Update planned_changes.md3ac2969 Sync shared_library patch</details>
<details> <summary>PDFium commit log</summary>
Commits between 5554 and 5567 (latest commit first):
68b78719e Specify output name for pdfium build component8ba428591 Roll base/allocator/partition_allocator/ 180ceb478..85f9e65df (34 commits)7d7596357 Improve support for building pdfium_test with Skia in Chromium.16de56466 Rename UnownedPtr methods to match their raw_ptr counterparts.907b4591c Define preprocessor macro PDF_USE_PARTITION_ALLOC462e09358 Fix overlapping glyphs rendering for aliased textdd5aa5041 Check the first page xref size when parsing linearized PDFs.09b39bf80 Remove unused SkiaState members.ac09c8dd4 Use more size_t indices in SkiaState.d087df316 Remove reference to empty file SkUtilsArm.cpp406b2ef21 Use more spans inside SkiaState.6c7fe1557 Replace remaining SkTDArray usage in fx_skia_device.cpp.92c555291 Replace SkTDArray usage in SkiaState::CharDetail.8f083cead Use more references in fx_skia_device.cpp.cd4ded5d4 Clarify counts in SkiaState::DrawText().d8376b2fa Replace more SkTArray/SkTDArray usage in SkiaState.3784fcb3b Replace SkTDArray usage for SkiaState::m_commands.ddc5f79a3 Roll Code Coverage from 5afe9c957e79 to aa4af3749029 (3 revisions)c5b94d43b Roll Catapult from 27863274a2f2 to c4e9d16032d8 (44 revisions)</details>
Commits between `3.18.0` and `3.19.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.18.0 and 3.19.0 (latest commit first):
32fb453 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5541 and 5554 (latest commit first):
a2f4718ec Fix timeout handling in test_runner.py.8e1b9326a Rewrite CFX_DIBBase::DebugVerifyBitmapIsPreMultiplied() using spans.6b3505a17 Fixed low resolution for cached images.54020fcdf Avoid using SkTDArray in Skia shading code.5807e3433 Drop lines.pdf from the suppression list86af6c87f Update rendering heuristic when a font is substituted5e22ba150 [Skia] Remove suppression for xfa_bmp_image.inc89fbf38a Drop path_5_pattern.pdf from the suppression list983509fb2 Test rendering an XFA page74e7eb7f0 Add FORM_ReplaceAndKeepSelection for IME compositiona7bf41ad2 Always return recorder from FPDF_RenderPageSkp()adc69fe69 Roll buildtools/clang_format/script/ 8b525d274..f97059df7 (9 commits)980903eb1 Remove uses of SK_DEBUG and SkAssert4c1d6e931 Drop suppressions for pdfium:18565f780e166 Conditionalize functions not needed under V8_ENABLE_SANDBOX7c84cdac7 Sync .clang-format with the Chromium copy.f7a43667f Add pixel test for image-path misalignment14e6c841c Use a single data storage in Upsample() in fx_skia_device.cpp.80ff4c457 Remove Upsample() out-parameters in fx_skia_device.cpp.</details>
Commits between `3.17.0` and `3.18.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.17.0 and 3.18.0 (latest commit first):
66c18d9 [autorelease] update changelog and version file4d113d4 Next attempt to make GH pages rebuild automaticallyd63e638 Revert explicit GH Pages trigger</details>
<details> <summary>PDFium commit log</summary>
Commits between 5527 and 5541 (latest commit first):
c363b521b Remove an obsolete TODO in fx_skia_device.cpp.7fd93825f Consolidate DebugVerify*IsPreMultiplied() methods.a7e6db448 Support V8_ENABLE_SANDBOX in CFX_ArrayBufferAllocator82b9043ac Do no bother checking GetDeviceDriver() results in fx_skia_device.cpp.0fcb28e08 Fix some nits in fx_skia_device.cpp.640a74171 Fix issue that colored patterns are rendered with dark borders0e84dee9b Remove both versions of CFX_SkiaDeviceDriver::PreMultiply().a4147f847 Revert "Hide FPDF_GetArrayBufferAllocatorSharedInstance() for incompatible V8"2f53b8edd Resolves the following technical debt issue:e5cabc608 Resolves the following technical debt issue:8bfd13800 Resolves 3 instances of the following issue:94d30b216 Resolves the following technical debt issue:911cbc385 Resolves the following 11 technical debt issues:5ec976c9e Remove bug_691967.pdf from the suppression list0f0a810cc Add regression test for rendering long dashed linesa70c21aaf Restrict the object types that FPDF_CopyViewerPreferences() copies.5688d711a Validate the page count.81508e9c0 Add FPDFViewEmbedderTest.DocumentWithEmptyPageTreeNode.aace6c82d Update Skia expectation for radial_shading_point_at_border.in7f7b62d40 Hide FPDF_GetArrayBufferAllocatorSharedInstance() for incompatible V85e8468a41 Fix bug_1395648.in expected image1abf03e19 Fix Skia rendering when using reverse-byte-order option.fe247d3ef Update Skia gni file lists and roll DEPS</details>
Commits between `3.16.0` and `3.17.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.16.0 and 3.17.0 (latest commit first):
0998991 [autorelease] update changelog and version fileb36daeb build workflow: explicitly trigger GH Pages rebuild</details>
<details> <summary>PDFium commit log</summary>
Commits between 5513 and 5527 (latest commit first):
b8f41c997 Update PDFium eng review reference to ATL insteads6adcd88ae Use Fx2DSizeOrDie() in more places inside cfx_dibbase.cpp.28015e720 Simplify CFX_DIBBase::CloneAlphaMask().0a1537c5c Use Fx2DSizeOrDie() in more places inside cfx_dibbase.cpp.c830a8bdb Add Skia support for 24 bpp FXDIB_Format4d8c779e1 Use factory method for CFX_SkiaDeviceDriver ctor.5530f040b [Skia] Fix an assertion errore370bb4dd Roll third_party/abseil-cpp/ 4cb960a03..6a7478b49 (9 commits)7c1ad46d3 Roll v8/ 06097c6f0..65852f336 (213 commits)b76996013 Roll buildtools/third_party/libc++abi/trunk/ 44d54baf4..dc82f3042 (5 commits)019ef9b04 Roll buildtools/third_party/libunwind/trunk/ fd49ee4ee..5e22a7fe2 (5 commits)6ba849a10 Roll base/allocator/partition_allocator/ 109a742d1..180ceb478 (11 commits)e9a6aa76e Roll third_party/zlib/ d866d41e1..18d27fa10 (1 commit)d85ed92bf Update resultdb_version to git_revision:39e20ee396fe4a84eaa7f7d389e5659198c12e87db2d5fcc4 Roll tools/clang/ 65848dccd..3b54a131a (19 commits)5a868734b Roll third_party/icu/ 1b7d391f0..2c51e5cc7 (3 commits)2425edbe1 Roll DEPS for build, buildtools and libc++044cf385b Update gn_version to git_revision:5e19d2fb166fbd4f6f32147fbb2f497091a54ad8b6a7bd102 Roll Fuchsia SDK from version:10.20221201.2.1 to version:11.20230103.1.1c2f49cdb8 Roll third_party/freetype/src/ aca4ec590..ace97a02a (6 commits)c3de8a5a7 Roll third_party/depot_tools/ de9b59989..5b0c93402 (30 commits; 7 trivial rolls)dcb849847 Roll third_party/skia/ f54912810..15d36b15b (176 commits)bccd2a195 Roll Jinja2 from 4633bf431193 to 264c07d7e64f (1 revision)42cc039a4 Roll Catapult from 07489847d9ad to 27863274a2f2 (90 revisions)ddbfab1e2 [Skia] Add a pixel test that can trigger an assertion errorc676ff7ca Move RunCommandExtractHashedFiles() to test_runner.py</details>
Commits between `3.15.0` and `3.16.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.15.0 and 3.16.0 (latest commit first):
de936dd [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5499 and 5513 (latest commit first):
</details>
`f229542` textpage: count_chars() will not be deprecated after all
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.14.0 and 3.15.0 (latest commit first):
5e669b8 [autorelease] update changelog and version file317ff6d Rewrite planned changes filef229542 textpage: count_chars() will not be deprecated after all</details>
<details> <summary>PDFium commit log</summary>
Commits between 5485 and 5499 (latest commit first):
355229b74 Add timeouts to test_runner.pya72813f8d Use std::move() with CFX_SkiaDeviceDriver ctore84e4ca98 Use skpathutils in all usages of FillPathWithPaintbcf864d43 Roll v8/ 24bde5401..06097c6f0 (188 commits)</details>
Commits between `3.13.0` and `3.14.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.13.0 and 3.14.0 (latest commit first):
b4a4619 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5473 and 5485 (latest commit first):
6696d1a82 Assert CFX_AggDeviceDriver does not deal with 1 bpp bitmaps.2b115b526 Mention a restriction for ScanlineComposerIface::SetInfo().1f0b692d5 Remove some ref churn in CFX_DefaultRenderDevice::AttachImpl().5a8242d8b Remove a dead function in CFX_ScanlineCompositor.84be8f91c Mark CFX_ScanlineCompositor::Composite* methods as const.07ba7027c Disable Windows error reporting dialogs29b58181e Replace most GetBppFromFormat() calls in CFX_ScanlineCompositor.6061080bb Use more early returns in CFX_ScanlineCompositor.56c1413a8 Get rid of GetIsAlphaFromFormat().713943f9f Remove an unused CFX_ScanlineCompositor::Init() parameter.e9eb802ea [Skia] Fix rendering issue for converting 1 bpp image source999e21fa2 Remove some CFX_ScanlineCompositor::InitSourcePalette() parameters.a1e5b384b Remove CFX_ScanlineCompositor::m_Transform.38bd77b7d [skia] Use skpathutils namespace instead of global one1e5f8aac8 Replace CFX_ScanlineCompositor::m_iTransparency with 2 structs.89b367b8f Unnest some code in CFX_ScanlineCompositor.374c5357b Use absl::holds_alternative<T>(variant) instead of variant.index().472d5b44a [Skia] Add pixel test for --render-oneshot issue1b0b652d2 [Skia] Suppress failed corpus testscff8b3bab Roll testing/corpus/ 917d3b447..23370cd97 (6 commits)6245268e3 [skia] Remove legacy call to paint.getFillPath83d0028e3 Remove unused agg::path_storage::add_path_curve().58858f7e1 Suppress failed corpus tests6ecefa6f0 [Skia] Unsuppress xfermodes.pdf corpus testeed57bffc Fix PDF Path object Bezier joins renderingf98de8d21 Insert FlushForDraw() within DrawBitsWithMask()f52c2a7cb Update corpus tests expectations and suppress more corpus tests2eaed93d0 Remove obsolete TODO83f831b84 Run more test variations in coverage_report.py.c7a477833 Drop support for disabling the SkiaState cached0f42d7bf Fix a regression in CFX_PSRenderer::FaxCompressData().eef0a633b Make CFX_UTF8Decoder easier to use.af922ac8d Fixed an issue where the installed ComicSansMs font is substituted</details>
Commits between `3.12.0` and `3.13.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.12.0 and 3.13.0 (latest commit first):
978e5ff [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5466 and 5473 (latest commit first):
9a02c9040 Avoid MSVC warning D9025 when pdf_use_cxx20=false65535b872 Add test for masked image clipping issueccf7cba44 Undo check for invalid URIs in FPDFAction_GetURIPath().56adfa042 Cherry-pick libtiff commit to revise handling of TIFFTAG_INKNAMES.596d32946 Cherry-pick libtiff commit to fix OJPEG hack.</details>
Commits between `3.11.0` and `3.12.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.11.0 and 3.12.0 (latest commit first):
4f659c1 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5459 and 5466 (latest commit first):
4e9c5b750 Upgrade to lcms 2.14.cd83e740c Roll base/allocator/partition_allocator/ d84273fde..109a742d1 (13 commits)a7cc2d219 Roll third_party/abseil-cpp/ 1016c233b..4cb960a03 (10 commits)69d11eaac Remove pdf_use_cxx20_override.0a2b8101b Cherry-pick libtiff TIFFReadRGBATileExt() fix.4a66cbebc Roll v8/ 248e6317f..24bde5401 (131 commits)f192919a4 Roll third_party/instrumented_libraries/ a8992bf8a..87467200f (3 commits)9024022ed [Skia] Add a pixel test of 1-bpp and 8-bpp images86ee23220 Roll DEPS for buildtools and libc++.23ee4fb33 Roll base/allocator/partition_allocator/ 9f2740129..d84273fde (17 commits)86a058009 Add option for building with C++20 and roll DEPS for Abseil.7804c2fc9 Roll tools/clang/ 2991b63fa..65848dccd (15 commits)f5850c991 Roll build/ 4b87ced7d..2748ef76c (115 commits)</details>
Commits between `3.10.0` and `3.11.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.10.0 and 3.11.0 (latest commit first):
0a48358 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5445 and 5459 (latest commit first):
1aa642da9 Roll DEPS for build and tools/clang.a4ee32c5c Roll tools/clang/ 38497dbb2..d3df9cc53 (8 commits)e57c44ecf Roll build/ 53351eb16..4f35453d0 (112 commits; 1 trivial rolls)3836eb014 Force builds to use C++17 in standalone builds.ca1ec1dee Add a comment for no_check_targets in //.gn.2370f15c0 Put hard CHECKS() in fxcrt::Retainabled88861ac9 Update Skia build config to not override the C++ standard.ea231736e Roll v8/ 43396790e..248e6317f (176 commits)b988ee18c Update gn_version to git_revision:70d6c60823c0233a0f35eccc25b2b640d2980bdcc5217b39f Roll buildtools/third_party/libc++abi/trunk/ 8dd405113..44d54baf4 (7 commits)27b2d8847 Roll buildtools/third_party/libunwind/trunk/ aabcd8753..fd49ee4ee (5 commits)62631bf13 Roll Fuchsia SDK from version:10.20221027.2.1 to version:10.20221201.2.193e4c7c9b Pass retained argument to CPDF_ObjectStream::Create()6aba625bc Roll third_party/depot_tools/ 6f2321d1d..de9b59989 (54 commits; 20 trivial rolls)adf54f049 Roll third_party/nasm/ fc8e0bd89..0873b2bae (1 commit)c686791a6 Roll third_party/zlib/ cff720848..d866d41e1 (3 commits)8dd8edcb0 Roll third_party/freetype/src/ 63ccaef07..aca4ec590 (6 commits)4491194d0 Roll tools/memory/ 8581381d9..5d2efcc93 (5 commits)ab1b39d3e Roll third_party/libpng/ e541f0335..20d2554f8 (1 commit)1d4328dbd Remove more dead code in CFX_ScanlineCompositor.87a7c1dc9 Add RetainPtr<>::AsRaw()1bab166a7 Remove some dead code in CFX_ScanlineCompositor.a76f883e0 Remove dead code in CStretchEngine.0dddba4f8 Remove remaining CFX_DIBBase stub methods.78706449c Remove several CFX_DIBBase stub methods.83307e0cd Avoid leaking freetype compiler flags to the rest of the project.196bbd49e Remove some dead code from CFX_BitmapComposer.fc91b52a6 Remove CFX_DIBBase::m_pAlphaMask and some related code.af586c709 Remove SkiaPathsae67f8955 Removes SKIA_SUPPORT_PATHS macro51a08963f Remove run-time selection for SkiaPathsb79e4998e Assume pdf_use_skia=true in //core/fxge/skia9df50a50b Avoid integer overflows in CFX_BitmapComposer::ComposeScanlineV().a4e946ee8 Roll testing/corpus/ 580b91b2a..2563803ad (3 commits)2d2366595 [Skia] Remove annotation_square_dash.pdf from the suppression list1a0e4da53 Remove SkiaPaths from testing infrastructure3d626d95b Use more spans in CFX_DIBBase::SwapXY().ae7457553 Use more spans in RgbByteOrderTransferBitmap().78a0ffab5 Drop support for "pdf_use_skia_paths_override"f4bdb41b4 Add some unit tests for FX_ParseDateUsingFormat().f467b3693 Update SkiaPaths RgbByteOrderTransferBitmap() implementation.67993b4c4 Fix bad refactoring in RgbByteOrderTransferBitmap().46e0999af Fix integer overflow in CPDF_RenderStatus::LoadSMask().c3f7190e4 Avoid integer overflows in CFX_DIBBase::SwapXY().64dcae03d Remove duplicate GetSizeOrDie().8e29731cc Roll Catapult from 3a19f7afaa58 to 07489847d9ad (60 revisions)</details>
Commits between `3.9.0` and `3.10.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.9.0 and 3.10.0 (latest commit first):
2514e8d [autorelease] update changelog and version file4086124 workflow: update tasks83fc660 Revert "Temporarily pin ctypesgen to fork"68a1cd3 Temporarily pin ctypesgen to fork51a86c9 gh_pages: limit push trigger to specific pathsc0a282e Pick ctypesgen call improvements from devel7055a63 release: fix pypdfium2 log</details>
<details> <summary>PDFium commit log</summary>
Commits between 5431 and 5445 (latest commit first):
76cec9aed Replace pointer arithmetic with spans in CFX_BitmapComposer.90ab854a8 Move Fx2DSizeOrDie() to a new fx_2d_size.h header file.5a84ee630 Impose allocation size limit in fx_memory_malloc.cppf1a679ec0 Use checked math in RgbByteOrderTransferBitmap().1bc33bb83 Roll third_party/icu/ 35132cceb..1b7d391f0 (3 commits)4705e8bcb Roll v8/ 7ff976805..43396790e (509 commits)52d831939 Add nigi@chromium.org to OWNERS.</details>
In setup code, implemented a workaround to sanitize tar archives on extraction, preventing CVE-2007-4559 directory path traversal attacks in case of m…
<details> <summary>PDFium commit log</summary>
Commits between 5418 and 5431 (latest commit first):
d5356204a Support --md5 with pdfium_test --skpc5069d06b Pass const arrays as spans in faxmodule.cpp, part 2.7bf268c53 Replace memcpy() with safer spancpy() in fx_crypt.cppfb5521ae8 Pass const arrays as spans in faxmodule.cppef2d236ee Refactor pdfium_test's rendering paths into classes5c18e8738 Replace pointer arithmetic with spans in CFX_BinaryBuf.61e618955 Pass spans to ToString<T>().fe90654d8 Pass constant arrays as spans to StringTo<T>()9b25e9814 Populate bitmaps even when using SkPictureRecorder7905fe91e Use spancpy()/spanset() in cfx_bmpdecompressor.cpp2dcc45a1a Construct pdfium::span<T> from std::array<T, N>.f446aae6c Enable Skia PNG encoder05eaf8b28 Update FRC_10_8.2.4_View_C.pdf entry in the suppression list730e59911 Delete //third_party/libpng16e66603249 Use shared //third_party/libpng dependencyefd00c258 Add third_party/libpngcc3a9be4b Fix the crash in CFX_SkiaDeviceDriver::StartDIBitsSkia().66245bea2 Place CLZWDecoder::decode_stack_ and codes_ into data partitionb92231f9e Update imports in coverage_report.py.247aff6cb Roll third_party/freetype/src/ 0b62c1e43..63ccaef07 (20 commits)cc53629d5 Roll base/allocator/partition_allocator/ cb1f2e8e0..9f2740129 (24 commits)0cd76726a Give SkUserConfig.h a unique filename.5eda47dd4 Remove a check that is always true in CPDF_IndexedCS.b4b2831a7 Avoid needless casting to uint8_t* in cfx_dibbase.cpp69bddfee8 fix some clang-tidy member init suggestions.b9efec82e Check resolution_levels_to_skip value in CJPX_Decoder::Init().d4d1ae357 Simplify a loop inside CBC_OneDimWriter::RenderResult().a067234d6 Install CIPD ninja using DEPS</details>
Major improvements to GitHub Workflows.
<details> <summary>PDFium commit log</summary>
Commits between 5406 and 5418 (latest commit first):
a98c08922 Ensure checkout_skia is defined before use4948d0e50 Only GN check //skia if checkout_skia=Truef8cf2e34d Add ARM64 expectations for pdfium embedder testsf0e239249 Change CBC_OneDimWriter::AppendPattern() to use spans.d7fe73817 Better span arithmetic in CPDF_Image::SetImage()496ff1161 Prepare CBC_OneDimWriter::AppendPattern() for span conversion.055a8a210 Clean up CBC_OnedCode39Writer.65cbd7d93 Return vector from CPDF_Stream::ReadRawData()06943a994 Use more spans in streams, part 51852aa019 Include more Skia files in GN checks1d94eaddb [Skia] Remove bug_880920.pdf from the suppression listc2ab68313 Suppress GN check issues with Skia includes in fpdf_view*.cpp.1ed2d0bd9 Change CBC_OneDimWriter::Encode() to return DataVector.dc2219869 Change CBC_OneDimWriter::RenderResult() to use a span.898c5e841 Remove dead code in CBC_OneDimWriter::RenderResult().4fbd4ab67 [Skia] Fix the issue that unwanted black borders are rendered.b5de5e89e Get rid of a multiplier in the 1D barcode implementation.5c042e4aa Allow spans to flow further down into CFX_DIBBase.8ebc9515f Use more spans in streams, part 4.1f8d66db1 Convert CFX_BitStream to store a span<>ff0c8aa86 Remove needless multiplication by 1 in CPDF_Image::SetImage()868d94c69 Pass spans further down into jpx/jbig2 decoders52696f63d Return span<> from CFX_DIBBase::GetBuffer().477cbda97 Improve SkPictureRecorder ownership91e0c3f14 Use bounds-checked spancpy() in cpdf_rendershading.cppe05af4345 Reduce layers of wrapper functions in CBC_OneDimWriter::Encode().f673e82fd Remove height out-parameter from 1D barcode encoding methods.818c4cd3c Run GN check on third_party/icu.a42db2e05 Use spancpy() in a few more places.6472a498b Pass spans to ProgressiveDecoder::GifReadScanline().ed2828ff7 Replace sprintf calls with snprintf in third_party6a1250879 Use retained locals in CPDF_FormField804fd9ee2 Fix typos in FPDFAnnotEmbedderTest.InkAnnotation3d4231cfb Roll Instrumented Libraries from 673b76772c2e to a8992bf8abb3 (10 revisions)</details>
`95b4a04` workflow: address set-output deprecation
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.6.0 and 3.7.0 (latest commit first):
e220e13 [autorelease] update changelog and version file039d3a3 Add additional testing workflows632ff95 GH pages: nevermind, build on push to maincaf99d3 GH Pages: Daily build at 11 o'clock UTC734bec3 Add workflow for GH Pages31b7ad2 Blacklist broken wheel release95b4a04 workflow: address set-output deprecation</details>
<details> <summary>PDFium commit log</summary>
Commits between 5392 and 5406 (latest commit first):
7b8416e79 Add NOLINTNEXTLINE missed in prior CL.490d68130 Add NOLINTNEXTLINE() to public methods with murky ownership.8df158b30 Roll third_party/abseil-cpp/ 751b72a8c..384efd2e8 (11 commits)a85fe5432 Roll build/ 371b6c310..53351eb16 (37 commits)15255e1a4 Move-assign object in cpdf_object_walker_unittest.cpp010d211f3 Use retained locals in cpdf_pagecontentgenerator_unittest.cppaf616af06 Use retained local in CPDF_StructTree::LoadPageTree()5b5987975 Remove RetainedTreeNode<T>.9f138e5d1 Restructure CPDF_Object methods to avoid analyzer warnings4da347bd4 Remove RetainPtr<T>::operator=(T*)d89d2e00f Use retained locals to avoid implicit .Get() calls20390f831 Turn off PartitionAlloc when building with GCC as well.d3d2ad3d2 Take small suggestions from clang-analyzer run over fpdfapi/3e08c2abb Avoid fatal OOM in CStretchEngine::StartStretchHorz().5fdfb25eb Use more spans in CStretchEngine.d6f9fe053 Fix some nits in fx_memory code.6c5cfd873 Use FixedTryAllocZeroedDataVector in CPDF_ContentParser.e5aa62574 Implement FixedTryAllocZeroedDataVector.e5bd69272 Actually fix clang-tidy report257a3d763 Change CPDF_SyntaxParser::ReadBlock() to take a span.204d96e1b Re-enable OOM test cases.e1c2bcf6c Use more spans in streams, part 3.b33a5a61d Build SkOpts_crc32 on ARM648636cff40 Fix copyright headers in GN files5c00919b2 Speculative change for clang-analyzer.1f8663684 Use more spans in streams, part 2.b81de425a Remove const-ref retained stream arguments, step 3.b9898333d Fuzz the new CJPX_Decoder::Create() parameter.6a39df1f7 Use more spans in fxcrt streams.9b46097ae [Skia] Remove some corpus tests from the suppression listcb1aee119 Add DCHECK() for non-zero sized spans with null data members.fb3d15edc Roll tools/memory/ 98140a694..8581381d9 (2 commits)b3cb989f7 Roll buildtools/third_party/libunwind/trunk/ 7ff728a97..aabcd8753 (8 commits)7d89cb013 Roll buildtools/third_party/libc++abi/trunk/ 5c3e02e92..8dd405113 (10 commits)75f0ff464 Remove const-ref retained stream arguments, step 2.06d220f2b Add stronger checks in span_util.h732e38a17 Remove const-ref retained stream arguments, step 1c323bf9ba Disable LargeImageDoesNotRenderBlank test case in debug builds.027326013 Add a test case for rendering a large image.832a694e5 Update old-style copyright headersf01a27d2b Fix non-compliant copyright headers5e33cbd12 Enable pan-project checks8d2f700af Improve integer overflow checking in CStretchEngine::StartStretchHorz().ab6c904a2 Update gn_version to git_revision:11dc0b1f438bd26380774e9d50fd4c63f346d41add7089fa8 Roll Catapult from 16eb7278843e to 3a19f7afaa58 (59 revisions)59f26709f Roll MarkupSafe from 1b882ef6372b to 13f4e8c9e206 (1 revision)9cab1a6e7 Roll Code Coverage from 690a8f131004 to 5afe9c957e79 (1 revision)be6fac607 Roll Jinja2 from ee69aa00ee85 to 4633bf431193 (1 revision)bdbf62394 Roll third_party/nasm/ 9215e8e1d..fc8e0bd89 (3 commits)</details>
Commits between `3.5.0` and `3.6.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.5.0 and 3.6.0 (latest commit first):
81638c9 [autorelease] update changelog and version file</details>
<details> <summary>PDFium commit log</summary>
Commits between 5378 and 5392 (latest commit first):
16812d6c1 Return object number from CPDF_IndirectObjectHolder::AddIndirectObject()5b59f6d89 Add FPDFText_HasUnicodeMapError() API.b899fba4e Fix one unretained dictionary usage in CPDF_DIB03571c10b Delete shebangs from some skia_gold scripts.7faffd69b Remove "from future" Python imports.b915e047f Change safetynet scripts to run with python3.231e7e159 Optimization of decoding large JPX images82cad2c70 Update comments about ownership in cpdf_indirect_object_holder.hb76ba9742 [Skia] Fix the black borders of small imagesf84a8a581 Roll third_party/depot_tools/ e3ed6a8e0..6f2321d1d (55 commits; 23 trivial rolls)8dda52ced Roll Fuchsia SDK from version:9.20220929.2.1 to version:10.20221027.2.16f144ed06 Remove remaining UnownedPtr<>::Get() calls from core/8f819ac22 Roll base/allocator/partition_allocator/ bb627f4ab..cb1f2e8e0 (48 commits)bb9bf7d99 Remove explicit UnownedPtr<>::Get() calls from core/fpdf*/c4acde581 Remove explicit UnownedPtr<>::Get() calls from fpdfsdk/654d3591d Remove explicit UnownedPtr<>::Get() calls from fxjs/b4d26b104 Remove explicit UnownedPtr<>::Get() calls from fxbarcode/0c3768e5d Remove explicit UnownedPtr<>::Get() calls from xfa/5cc1afc13 Pass retained argument to ReplaceAbbr()5ade14bea Return retained objects from CPDF_FormField methods.245050a61 Report more detail to ResultDB for pixel testsddc99ced8 Add test for CFFL_ComboBox::SetActionData()dab891757 Roll third_party/zlib/ 6fe4ce825..cff720848 (3 commits)4eda5e1f5 Roll third_party/icu/ 20f8ac695..35132cceb (2 commits)cc90b0cd9 Hide CPDF_FormField from CFFL_ComboBox59445b0a8 Roll tools/clang/ a5e0d7234..38497dbb2 (21 commits)2aa86baac [Skia] Fix issue that a dot annotation is not rendered1f7ef7c1d Remove some CPDF_Dictionary* locals.7c96f4765 Remove CPDF_Creator::m_pMetaData.2bd16e8c9 Make CFFL_ComboBox embedder test use higher-level methods.0df0082af Add embedder test for FFL_ComboBox::GetSelectExportText()ec350d928 Create CFFL layer embedder test.cb6e71594 Remove CPDF_FormField::GetForm()a5bd2fa0f Hide CPDF_FormControl from CFFL_Button1f8e56793 Rename CPWLComboBoxEditEmbedderTest::GetCFFLFormFiller()c44513e09 Make CPDF_PageView::GetInteractiveForm() a private method.9fe8223f0 Forward declare CPDF_ImageLoder in cpdf_imagerenderer.h8482a83de Replace CPDF_Page::SetImageCache() with AddImageCache()98204b688 Move pixel test-only code to TestPixel()61a662172 Make CFX_RenderDevice::GetDeviceDriver() a protected methodb6c3a4de2 Revert "[Skia] Fix issue that a dot annotation is not rendered"22396a1ac [Skia] Fix issue that a dot annotation is not rendered7ae9c064b Roll third_party/skia/ 3050ef5ea..648827391 (287 commits)371f0b063 Remove const form of CPDF_RenderContext::Layer::GetObjectHolder()31fe0722b Add Skia expectation for an AGG-only line drawing issue.927f85782 Roll third_party/skia/ ebfa2b71b..3050ef5ea (18 commits)3bd5f342d Move CPDF_ImageLoader to page/ layer.2c9b918c2 Roll third_party/skia/ 03cb8e7d8..ebfa2b71b (4 commits)68fdc4913 Remove render layer concepts from CPDF_ImageLoader.</details>
Fixed an issue with the __new__ method of PdfPageObject that caused __init__ to run twice.
__new__ method of PdfPageObject that caused __init__ to run twice.<details> <summary>pypdfium2 commit log</summary>
Commits between 3.4.0 and 3.5.0 (latest commit first):
0599f11 [autorelease] update changelog and version fileb5560d9 Update Readme and Changelog76b656a pageobj: do not run init twiceeb9e7c8 Readme: Fix image insertion example0e77758 docs: improve changelog integration for latest builds again</details>
<details> <summary>PDFium commit log</summary>
Commits between 5364 and 5378 (latest commit first):
16a4de2bb Report test_runner.py test case output to ResultDB8841d123a Shorten CPDF_PageImageCache::ImageCacheEntry to Entry57a6f3d3d Remove CPDF_Page::RenderCacheIface167a560c7 Move CPDF_PageImageCache to page/ layer.b96600ee9 Rename CPDF_PageRenderCache to CPDF_PageImageCache.c988eee72 Remove render-layer concepts from CPDF_PageRenderCache.bce5eb53f Processing the NoRotate flag when displaying annotations152084631 De-duplicate document pointers in CPDF_PageRenderCache::ImageCacheEntry74faf2c3b Add experimental FPDFText_IsGenerated() API.607b84ebd Roll v8/ f666aea4d..7ff976805 (323 commits)4e52af07a Mark CPDF_Page::m_pPDFDocument as constdeba3a79b Update PartitionAlloc commentf0f61c87d Remove CPDF_StreamAcc::GetData().a46ea9b04 Remove CPDF_Stream's span ctor.6dc8a147d Remove CPDF_Stream ctor that takes a std::unique_ptr.5e5c2bd24 Limited build support for iOS.b9a3dd089 Roll third_party/freetype/src/ 905270925..0b62c1e43 (18 commits)5ea4ecf11 Add a pixel test for annotations with the NoRotate flag.dab79f117 Remove data parameter from CPDF_Stream::InitStream() and rename.a3c920fb3 Replace some CPDF_Stream std::unique_ptr ctor usage.235e56abd Change CPDF_Stream to store memory-based data in a DataVector.d61dac0d9 Use Google-style naming for CPDF_Stream member variables.9ab44983c Change CPDF_Stream to use absl::variant.11d077ffc Run Skia Gold as part of each pixel test784cc119a Avoid another use of CPDF_Document::GetPageData().91d13f4aa Reduce use of CPDF_Document::GetPageData()07d4ab7ec Change CPDF_Stream::GetInMemoryRawData() to return a span.9b0ee1fb2 Disentangle CPDF_ContentParser from CPDF_Form.baa3f372f Make CPDF_Pattern::document() a protected method.7e9f3de25 Use indirect object holder superclass in CPDF_PageContentManager.fb6dbcd0b Realize objects created with FPDF_NewFormObjectFromXObject().d07ce743f Returned retained result from CXFA_TextParser::GetParentStyle().47abf3795 Roll v8/ 261f00697..f666aea4d (42 commits)60a072f74 Report test duration to ResultDB56c4682ae Don't pickle TestRunner2a09fff07 Separate test_runner.py's per-process stated08ac75a8 Also check FPDFPageObj_GetBounds() in ImportPageToXObject test.ee31732f6 Avoid exposing CFFL_InteractiveFormFiller::CallbackIface to callers.821be7591 Remove CPDF_RenderOptions::GetOCContext().b50fad7d0 Make CPWL_Wnd::GetParent() a protected method.cb75a6ce4 Remove CXFA_FFNotify::GetWidgetHandler().61a96c1db Revert "Disable ResultDB for test_runner.py on Windows"f0a2d55c9 Roll build/ 01569374d..371b6c310 (103 commits)44528e4e1 Remove stray cppgc::Member<>::Get() calls0351b27f9 Convert CFXJSE_FormCalcContext::m_pDocument to WeakPersistent<>.756333545 Remove CFXJSE_ResolveProcessor::GetNodeHelper().aad1a8481 Remove CPDF_Annot::GetPopupAnnot()4adc95560 Enable 2 CFWLEditEmbedderTests</details>
Added a new support model PdfImageObject (which inherits from PdfPageObject). This can be used to insert a JPEG image into a page, get metadata, etc.
PdfImageObject (which inherits from PdfPageObject). This can be used to insert a JPEG image into a page, get metadata, etc.latest builds.<details> <summary>pypdfium2 commit log</summary>
Commits between 3.3.0 and 3.4.0 (latest commit first):
75a3854 [autorelease] update changelog and version file1c6bde4 Improve insert_jpeg() API9998d5a Revert "Remove PdfDocument._rendering_input and related features"d92ba57 misc: replace private methode7fad89 Move colour validationb175e3c readme: add jpeg insertion examplee10f083 jpegtopdf: enhance comment7c34f76 pageobjects: add initial image support model (#151)a631a1a docs/matrix: remove trivial information18017dc docs: group C wrappers and pure-python helpersab934e4 Use a smarter way to keep data in memoryc1b0261 Inline utility methods613f10f document: make assignment order nicer90a6c38 Smarter inclusion of changelog_staginga829800 docs: include changelog_staging depending on branch7aaa2e8 setup_base: nvm, use previous ext_modules approach549e02f Inline opener into documentbfbaf0f Clean up unused importsa2d0762 Make file access utilities publiccc0c2b6 opener: make get_fileaccess() a standalone function950db18 Slightly improve docs for static attributes5991e8b setup: don't pin ctypesgen anymorebfd4e53 setup: this if should have been an eliff1f510c Remove PdfDocument._rendering_input and related features</details>
<details> <summary>PDFium commit log</summary>
Commits between 5351 and 5364 (latest commit first):
336fae19c Remove unused method CPDFSDK_Widget::GetInteractiveForm()fdbd4bb76 Use fxcrt::MakeFakeUniquePtr() in a few more places.3deb8857c Disable ResultDB for test_runner.py on Windowsbc05517b5 Remove CXFA_FFDoc::GetPDFFontMgr()52370c146 Make CPDF_PageObjectHolder::RemovePageObject() clearerd1aaef4aa Replace tuples with dataclasses in test_runner.py89acf61db Use pdfium::Contains() to check CPDF_Form membership.72312d25b Add CFXFontMapperSystemFontInfoTest.85c3cc8c7 [Skia] Remove path_9.pdf from the suppression listdf597389f Remove .vpython.0e1f9b468 Replace CFX_Font::SetSubData() with AllocSubData().b214cdcb3 Wrap CFXJSE_Engine::GetJseContext() with GetJseContextForTest().146766408 Avoid returning unowned reference from CPDF_PSOP::GetProc()20ab33b4a Simplify test case dispatch in test_runner.py3c5b5abbb Remove CPDF_Parser::GetSyntax()8bad4d5fd Remove 2 corpus tests from the suppression list9d2c662f5 Fix CHECK failures with GetFontData() calls.318ad8501 Rename CPDF_DataAvail::GetHintTables() to GetHintTablesForTest()30814aedc De-virtualize CPDFXFA_Context::GetPDFDoc().9ab5ed692 Make CPDF_ColorState::SetPattern() less confusing.2f7efe5d8 Pass retained args and arrays as rvalues to color.a997e9b48 Add ResultDB support to test_runner.py029e389ef Mark GetDocument() protected in CPDF_Document::PageDataIface.820c7b418 Mark pdfium::span<> as TRIVIAL_ABI and GSL_POINTER755476171 Encapsulate CFX_SubstFont::m_bFlagMM.6a29d9e55 Add GSL_POINTER and TRIVIAL_ABI to compiler_specific.hef47a11d4 Remove CPDF_Annot::GetDocument()7516d8827 Remove CPDF_InteractiveForm::GetDocument().f369dce2e Consolidate Python code to locate PDFium root529184818 Return retained reference from CPDF_Font::GetFontDict()9e4521d1f Fix overlapping annot rendering with focused annot.95b363233 Fix CPDF_DocPageData::MaybePurgeFontFileStreamAcc()67a546fe6 Introduce CPDF_StreamAcc::KeyForCache()560d03e25 Roll Instrumented Libraries from e09c4b66b6e8 to 673b76772c2e (1 revision)</details>
A new text extraction method get_text_range() was added. get_text() was renamed to get_text_bounded() but is still available as deprecated alias.
PdfPage.insert_text() does not generate page content automatically anymore. The new PdfPage.generate_content() method now needs to be called to apply changes, to avoid generating content repeatedly.PdfTextPage.get_text(), the boundary values are now only set to defaults if they're None, not 0. This change was necessary because the underlying PDFium function requires PDF box values rather than normalised values.close() methods is not mandatory anymore. The context manager API of PdfDocument is retained for backwards compatibility, but exiting the context manager does not close the document anymore, since this would increase the risk of closing objects in wrong order.get_text_range() was added. get_text() was renamed to get_text_bounded() but is still available as deprecated alias.n_chars attribute. count_chars() is still available as deprecated alias.<details> <summary>pypdfium2 commit log</summary>
Commits between 3.2.0 and 3.3.0 (latest commit first):
ba76f9b [autorelease] update changelog and version file16b5bb8 page: move comment to right place213ca63 workflow: re-activate schedule593f1b6 Remove commented-out close calls (#150)44f4aaa Remove excessive commentsa0f79ef Introduce get_text_bounded() right now7cf488f Mainly documentation improvements464f6a7 textpage: make error handling caller-configurable0f9ca15 textpage.get_text(): check coords are within mediaboxdbc5419 Comment out excessive debug messages379b820 Merge development branch (#148)02b2e77 doc/render: add shortcut for single-page pdfsbe2770d Improve docs for PdfDocument.get_page_size() and PdfPage.get_size()7ab2314 page: add notes regarding matrix renderingd4b6025 Improve matrix-related docs640aad0 Add matrix helper methods (#147)4e5a486 page.insert_object(): always set pageobj.pdfe2dc4f1 Update readme78c1102 Add helpers for XObjects (#145)</details>
<details> <summary>PDFium commit log</summary>
Commits between 5337 and 5351 (latest commit first):
fe212103e Return retained object from CPDF_FormControl::GetWidgetDict()14b3b8cee Introduce CPDF_Dest::GetScrollPositionsArray().4ede0790c Return retained references from CPDF_PageObjectHolder methods.57595d4af Remove CPDF_StreamAcc::GetDict().cfa4d05c9 Add death test for bad pdfium::span<> lifetimes756e1fe08 Use std::as_const() in a few places.411532e63 [Skia] Fix coons patch mesh renderinga88c2be5a Encapsulate the CPDF_Page annots array.c42ec58fe Encapsulate CPDF_StructElement::m_pDictd691ae619 Remove unused CPDF_InteractiveForm methods5680de5ef Better encapsulate CPDF_InteractiveForm::m_pFormNotify.643278dc3 Add tools/resultdb to DEPS61f2c1da3 Make CPDF_FormField::GetFieldAttr() a non-static methodbf0f077f4 Avoid vending dictionary pointers from CPDF_StructElement.ad9ec040e Delete unused CPDFSDK_AnnotReverseIteration.8176850eb Remove duplicate CPDF_FormField::GetDict() method.b0d3d7ab9 Stop vending dictionary pointers from CPDF_FlateEncoder05332a80d Minimize vending pointers from CPDF_Action (single A)6938b0c12 Fix PDF annotation drawing order.a1428d380 Avoid vending dictionary pointers from CPDF_AActionbbf75918a Add iterator stability comment to CPDFSDK_FormFIllEnvironment.191afc503 Convert compile-disabled Skia tests to runtime-disabled5c18b65d8 [xfa] Ignore invalid BMP pixel data offsetsc1b28b90c [xfa] Fix image decoding across block boundaries80cfc5e86 Roll Code Coverage from 06c29fb95a45 to 690a8f131004 (4 revisions)48215d6b5 Roll Catapult from 7ee071132a53 to 16eb7278843e (57 revisions)</details>
Commits between `3.1.0` and `3.2.0` (latest commit first):
<details> <summary>pypdfium2 commit log</summary>
Commits between 3.1.0 and 3.2.0 (latest commit first):
b3ba56c [autorelease] update changelog and version file16c0169 autorelease: improve versioning logicf37a0cf packaging_base: add note73b4d87 packaging_base: add FIXMEa045696 setup.py: improve error messages for invalid statesfbeb84d setup_base: add further exists() checks4cfa51c craft_wheels: address FIXME4e8464f craft_wheels: add a FIXME related to the artefact stash6830de0 build: replace dynamic values in resources.rcbcea29c readme updated1ae5cb Update tasks15796bf render_base(): remove allocator note67c8647 workflow: re-enable scheduleb3d6702 docs/python_api: fix missing word58a9d2f code comment: fix missing words</details>
<details> <summary>PDFium commit log</summary>
Commits between 5323 and 5337 (latest commit first):
cfc766988 Remove unused method CPDF_Link::GetDict()986e12acf Avoid vending pointers to CPDF_ColorSpace::m_pArray4df3e6b4f Support runtime renderer selection in FPDFProgressiveRenderEmbedderTest61eb8063f Roll third_party/skia/ 73fb58ce0..03cb8e7d8 (492 commits; 1 trivial rolls)79a701c67 Roll buildtools/ d66231001..cccaf48c8 (17 commits)3061eb8e9 Roll Fuchsia SDK from 9.20220830.0.1 to 9.20220929.2.1807603890 Roll third_party/icu/ bbdc7d893..20f8ac695 (1 commit)a37c9f0c9 Roll third_party/depot_tools/ 3528d4d3c..e3ed6a8e0 (45 commits; 13 trivial rolls)d442cee2b Roll tools/clang/ 0a2285903..a5e0d7234 (23 commits)2fd6393c6 Roll third_party/zlib/ 926ac230d..6fe4ce825 (10 commits)60b3a0116 Roll tools/memory/ e5f1a8a76..98140a694 (1 commit)5945cf536 Update gn_version to cc28efe62ef0c2fb32455f414a29c4a55bb7fbc4ae04146f0 Roll v8/ 340416187..261f00697 (180 commits)73c5b8d68 Roll third_party/libjpeg_turbo/ 22f1a22c9..ed683925e (1 commit)1c35dd500 Roll base/trace_event/common/ 640fc6dc8..521ac34eb (3 commits)1a0312c74 Roll buildtools/third_party/libc++abi/trunk/ 48afced8a..5c3e02e92 (2 commits)8cb439419 Roll buildtools/third_party/libunwind/trunk/ 42aa6de55..7ff728a97 (3 commits)310c450c2 Only validate indexes for paletted BMPs144d4729b Add basic unit tests for BMP decodingb4a309d9d Fix initial BMP pixel offset2e5da1ba9 Roll third_party/freetype/src/ 8e68439a6..905270925 (10 commits)0969211eb Enable FPDFEditEmbedderTest.SaveAndRender for Skia9fe159009 Return retained result from GetShadingObject()e282b0fab Pass retained arguments to still more ctors/setters.14e8a0128 Fix roll-freetype.sh to work with sed on macOS5850f38fb Roll build/ 06b221966..01569374d (154 commits)da5d81449 Roll base/allocator/partition_allocator/ d47a38e4a..bb627f4ab (24 commits)5e8077158 Roll third_party/lss/ 0d6435b73..ce877209e (8 commits)b01b2cdd1 Pass retained arguments to fpdfdoc/ class constructors.f504a7655 Fix retained argument TODOs, part 8.e1d691d54 Fix retained argument TODOs, part 7.7870d8d06 Fix retained argument TODOs, part 6.c90fa00b4 Enable FPDFEditEmbedderTest.GetRenderedBitmapHandlesSetMatrix for Skia6d8dfa196 Remove image_8bit_devicergb_dctdecode.pdf from the suppression list6723234d3 Return retained object from CPDF_Form and CPDF_GeneralState methods.4ab13cbdb Document test runner positional arguments525a4270b Fix retained argument TODOs, part 5.0fbd8fc96 Use retained references in fpdfsdk/fpdf_*.cpp filesc62c31ef1 Fix retained argument TODOs, part 4.cda6ca689 Fix retained argument TODOs, part 3.cd3d3798c Rework CPDFSDK_FormFillEnvironment::JS_appResponse() callers.bb040742c Return retained objects frm CPDF_Image methods5a3f1d31e Fix retained argument TODOs, part 2.06749a7a5 Pass/return retained args from CPDF_NumberTree.3df809cbc Fix retained argument TODOs, part 1.e08aa1ef0 Pass retained arguments to CPDF_PageObjectHolder.f9491f39e Fix unowned/retain ptr conversion and assignment.af0fcf1ed Pass retained arguments to CPDF_Action constructor82b558c70 Use FixedZeroedDataVector in JS_appResponse() callers.e319a902c Suppress example_062.pdf for Skia and SkiaPaths5bcf810e0 Reland "Remove ALLOW_UNUSED macros."bdb7acd02 Avoid using raw pointers as keys in maps.221055c8f Rearrange some variables inside CPDF_RenderShading::Draw().47d4b58c6 Rename some parameters in CPDF_RenderStatus.841343eaa Reuse GetObjectClippedRect() in CPDF_RenderStatus::ProcessShading().77a564fcb Remove example_025.pdf from the suppression list64d7c2d90 Remove PDFium's private copy of Partition Alloc.c4f3b9666 Store retained keys in CPDF_StructTree::StructElementMap.b7ee8d6c9 Return retained arguments from CPDF_ContentMarkItem methods.8a185fa43 Return retained objects from CPDF_Image and CPDF_Page methods.9f7dcae93 [Skia] Create a new palette when upsampling 1-bit-per-pixel bitmaps</details>
render_to() was fixed to actually allow callables. The code passage in question was unreachable due to an unguarded issubclass() check before.
render_to() was fixed to actually allow callables. The code passage in question was unreachable due to an unguarded issubclass() check before.<details> <summary>pypdfium2 commit log</summary>
Commits between 3.0.0 and 3.1.0 (latest commit first):
b6e8e6d [autorelease] update changelog and version file9117f42 Noneify .raw attributes on close23b2b77 Update changelog_stagingf59dc65 Revert automatic closing via delb37b326 page.render_to: fix compatibility with callables7d3e7ee converter: correct a docstring662f12b setupsrc: slightly enhance set_version()7ec0744 setup.cfg: reset sphinx to normal2f3680b workflow: comment out schedule againfc5bcd2 document: remove note on closing47d5c78 closing: check self before parentsfb62c5a setup.cfg: temporarily block sphinx 5.2.0.post0b068b9e Automatically close objects via __del__ (#142)69b3e9b autorelease: log beta releases, without manual summaryf22d6f7 changelog: fix up autorelease note on pdfium version</details>
<details> <summary>PDFium commit log</summary>
Commits between 5316 and 5323 (latest commit first):
014c24029 Revert "Remove ALLOW_UNUSED macros."2785e0210 Pass retained array to CPDF_Dest constructor.953ff0e12 Merge FixedUninitDataVector and FixedZeroedDataVector code.38c2dcc58 Make UnownedPtr and RetainPtr more similar to each other.99762aa82 Re-order RetainPtr/UnownedPtr operator=() methods42fc37599 Replace CFX_MemoryStream::GetBuffer() with GetSpan().d1f85fdbb Avoid ambiguity in CPDF_{Dictionary,Array}Locker constructors11a2745cd Return retained result from CPDF_Dictionary::GetPageDictionary()5b0176124 Switch from DataVector to FixedDataVector CPDF_CMap.0820b6b7a Use FixedDataVector in fxbarcode/ when applicable.7043b271f Add a FixedZeroedDataVector container.0dc2e884d Do more input checks inside BC_DefaultPlacement.cpp.065698acf Fix interaction between RetainPtr<T> and transparent comparisons.22a8e1526 Clean up CBC_DefaultPlacement.f10010959 Switch CPDF_TextPage::m_CharIndices back to DataVector.f24061bf2 Create helper function and move a constant to a header file07d7f6b34 Remove ALLOW_UNUSED macros.ba4ecd0a5 Use UnownedPtr<> keys in CPDF_FontGlobals.275ee19d0 Add transparent Contains() test to unowned_ptr_unittest.cpp081fa0b6f Prevent pdfium::Contains() from falling back to linear search.101e5c6be Prove whether unowned/retain pointer collections compare transparently9524684f4 [Skia] Remove DCHECKs on RGB channels during upsampling9b9170e56 Add unit test for transparent comparison of UnownedPtr<T>.8aad22ae5 Make CPDF_{Array,Dictionary} methods returning pointers internal-only.4424a54c6 Refactor Skia renderer runtime checks.7784e6a6b Runtime renderer selection for embedder tests786e8f65d Add FPDFAnnot_GetFormFieldAlternateName() API</details>
The previous rendering functions (render_topil() render_tobytes(), ...) are still around as aliases but might be deprecated eventually.
Support model
API-breaking changes
OutlineItem.page_index is now None rather than -1, to avoid accidental reverse list indexing and to enforce that callers properly handle this case. Moreover, OutlineItem.is_closed is now None rather than False if the bookmark has no kids.PdfPageObject.get_type() was replaced with a type attribute.PdfPage.count_objects() was removed. Use PdfPage.get_objects() or the raw PDFium API instead.PdfDocument.new_page(), it is now interpreted in reversed direction, rather than inserting at the beginning.PdfPage.render_base() now directly returns a ctypes ubyte array; BitmapDataHolder has been removed.annotations was renamed to draw_annotscolour was renamed to fill_colour and now only takes a list of 4 values for simplicity - it may not be 3 values or None anymoreno_antialias has been replaced with separate boolean options no_smoothtext, no_smoothimage, and no_smoothpathOther changes
OutlineItem now contains information on the number of sub-items (n_kids attribute).PdfDocument.get_page_size() to retrieve page size by index without needing to load a PdfPage (uses FPDF_GetPageSizeByIndexF() under the hood).colour_scheme, fill_to_stroke, force_halftone, draw_forms, rev_byteorder, prefer_bgrx, force_bitmap_format, extra_flags, allocator, and memory_limit.render_to() functions to PdfPage and PdfDocument that take a custom bitmap converter, to transform the ctypes array to a different object. A set of built-in converters is provided with the BitmapConv class. Confer the updated API documentation for details. The previous rendering functions (render_topil() render_tobytes(), ...) are still around as aliases but might be deprecated eventually.numpy_ndarray added.pil_image rendering target now accepts a prefer_la parameter to request automatic conversion of BGRA/RGBA to LA if rendering in greyscale mode with alpha channel.PdfPage.get_objects() can now recursively descend into Form XObjects.Setup code
$PYP_TARGET_PLATFORM was renamed to $PDFIUM_BINARY, the value sdist was renamed to none.purelib folder. Some systems use this information to separate platform-dependent packages from pure-python packages (i. e. /usr/lib64 instead of /usr/lib). Confer PEP 427.version.py and the actual version of the used binary. The update and build scripts do not directly change the main version file anymore, but defer the changes to setup.py..lock_autoupdate.txt in data/.MANIFEST.in file was added to avoid being dependent on setuptools_scm.Documentation
README.md. Added more support model examples and an extensive guide regarding the raw PDFium/ctypes API.<details> <summary>pypdfium2 commit log</summary>
Commits between 3.0.0b1 and 3.0.0 (latest commit first):
</details>
Your coding agent can read these notes before it upgrades. Set up the MCP server →