Skip to content

4.28.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 Mar 04:24
· 28 commits to main since this release

Changes (Release 4.28.0)

Summary (pypdfium2)

  • get_text_range(): Fixed a buffer size regression introduced in v4.26.0, caused by an unexpected behavior change in pdfium (thanks @elonzh for the bug report, {issue}298). Since that change, it is not possible anymore to tell the exact amount of memory needed, so we have to allocate for the worst case. Therefore, while this problem persists, it is recommended to instead use get_text_bounded() where possible.
pypdfium2 commit log

Commits between 4.27.0 and 4.28.0 (latest commit first):

  • 6d96769 [autorelease main] update 4.28.0
  • 8f6ecb0 readme/caller-datafiles: update ctypesgen command
  • 02cd006 Reduce some RST indents from 4 to 3
  • cd770e6 Add ability to force get_text_range()
  • 8daf76b textpage: fix up some typos
  • 380f30f Changelog for #298
  • 47a2b81 Possible workaround against #298 / pdfium bug 2133 (#301)
  • 26e7f60 readme: slightly rephrase
  • 2f297a5 Add contributions/response policy
PDFium commit log

Commits between 6281 and 6337 (latest commit first):

  • 09fbd30d5 Rename string's raw_span() method to unsigned_span().
  • ef0eeaa9e Fix wrong matrix outputs in CPDF_PageContentGenerator for path objects
  • f19f46647 Fix wrong matrix outputs in CPDF_PageContentGenerator for text objects
  • 081e8bb68 Fix incorrect current transformation matrix when saving PDFs
  • 28483abbe Add path objects tests for a PDF saving bug
  • 78e300622 Change GetColor() to WriteColorToStream()
  • be20f54f3 Update UNSAFE_BUFFER macros to match chromium/src/base
  • 71e2229aa Add text object version of a more complex test for a PDF saving bug
  • ff374196e Remove out-parameters from CPDF_Color::GetRGB()
  • 967494c5e Remove out-parameters from CPDF_ColorState::Set{Color,Pattern}()
  • 3189488fe Do no write out identity matrices in CPDF_PageContentGenerator
  • 8ebeb124b Fix building with GCC
  • 504ae0c73 Fix nits in CPDF_PageContentGeneratorTest
  • 3055d3857 Make CFX_RenderDevice::GetDIBits() take RetainPtrs by value
  • 36cd3f41e Rename some colorspace methods
  • ac728e5cb Rename CPDF_ICCBasedCS member variables
  • 8fa6a324c Roll third_party/zlib/ 646b7f569..3787595bb (4 commits)
  • 03e96fc9d Remove the matrix from CPDF_GeneralState
  • 624807fbd Avoid "unsafe" string indexing in PDF_NameEncode().
  • f1805084d Convert EXPECT_STREQ(x, y.c_str()) to EXPECT_EQ(x, y).
  • 0c6ef5db1 Avoid result string with trailing NUL in XFA Decode().
  • 82e2c19b8 Roll third_party/skia/ 9832c7722..49f18efdf (331 commits)
  • 85589aac0 Roll Catapult from f448d5bf8e57 to 4dc7721a1444 (93 revisions)
  • 22f234e4d Roll libpng from f11b2ae20fa0 to 3c7486b231c7 (2 revisions)
  • 530f34f13 Roll third_party/skia/ 6279c88b9..9832c7722 (80 commits)
  • 60bcaeb27 Make core/fxcrt compliant with UNSAFE_BUFFERS() macro.
  • 0744e71e2 Avoid some UNSAFE_BUFFER noise in fpdf_parser_utility.h.
  • df60f7f4c Fix incorrect matrix outputs in CPDF_PageContentGenerator
  • 074387f08 Add a more complex test for a PDF saving bug
  • 88eff81cc Add a test case for a PDF saving bug
  • 314d76477 Simplify PDF_EncodeText() using FX_UTF16Encode()
  • af1239af6 Make CPDF_IccProfile's dependency more direct
  • 3771a29b4 Remove CFX_Font::IsEmbedded()
  • 050ae79e8 Stop making CPDF_IccProfile an Observable
  • 038d39b31 Avoid more future unsafe buffer usage in StringDataTemplate.
  • 9108588e6 Move remaining code out of third_party/base and into core/fxcrt
  • b8ea87677 Remove remaining NoDestructor usage
  • 01e6d560e Convert some C-style arrays to std::array<>.
  • a7fca8a4f Add a way to undo a previous FPDF_SetSystemFontInfo() call
  • b4fb36188 Re-write some unsafe string code prior to UNSAFE_BUFFERS.
  • fec5a9706 Roll v8/ b6fd2f17b..a86e19715 (464 commits)
  • 04a9cf6cb Make CodePointView::Iterator() demonstrably safe.
  • f3209d029 Fix build with chrome plugin enabled but Partition Alloc disabled,
  • 7f1ff0f44 Roll MarkupSafe from 0bad08bb207b to e582d7f0edb9 (1 revision)
  • 2be9efb5f Roll Instrumented Libraries from 0011c28c8d35 to 0893d760101b (1 revision)
  • 132a5215a Roll Jinja2 from e2d024354e11 to c9c77525ea20 (1 revision)
  • 43bfc30b0 Copy absl::WrapUnique()'s static_asserts into pdfium::WrapUnique()
  • 6261e1499 Remove code in the form of "return std::move(local_var);"
  • d72fd575f Move third_party/base/ptr_util.h to core/fxcrt
  • 34e34057a Merge third_party/base/memory/aligned_memory.h into fx_memory.h
  • ee6325efe Move third_party/base/test/scoped_locale.* to testing
  • 81b3f39ed Move third_party/base/{debug,win} to core/fxcrt
  • e89957979 Convert CFX_XMLParser::current_text_ to WideString
  • f36006cdf Move third_party/base/numerics to core/fxcrt/numerics
  • d4c0790fe Rename TrimLeft()/TrimRight() to TrimFront()/TrimBack().
  • 1908cfc53 add file annot api
  • f778d3c42 Move third_party/base/containers/*.h to core/fxcrt/containers
  • 86aa2fb2e Move {Byte,Wide}String::Trim{,Left,Right}() into StringTemplate<>
  • ba6031ad9 Force LF line ending for the AUTHORS file
  • 67963ba70 Remove Fuchsia support
  • a426b95b7 Fix typo in public/fpdf_sysfontinfo.h
  • 812acaddb Disallow absl::optional usage via include_rules
  • 05f42a1cc Enforce checkdeps when submitting CLs
  • 1d732b2aa Fix include rules in cfx_glyphcache.cpp
  • 37935952b Move third_party/base/span.h to core/fxcrt
  • 7a3e5c034 Move {Byte,Wide}String::Replace() to StringTemplate<>
  • a6bea32c5 Get rid of FX_GET_32WORD macro.
  • dbff3cbe9 Use more spans in Revision6_Hash()
  • d4ee164ef Move {Byte,Wide}String::SetAt() into StringTemplate<>
  • 41760201f Move {Byte,Wide}String::Find() into StringTemplate<>
  • 88e1fe5c3 Remove fxcrt::ByteSwapTo* functions
  • 006476b26 Move {Byte,Wide}String::Insert() to StringTemplate
  • b9bd64794 Move {Byte,Wide}String::Delete() into StringTemplate.
  • 12772dac9 Consolidate byteorder code
  • 2edcdd72f Fix use-after-move in CPDF_RenderStatus::CompositeDIBitmap()
  • 549afab11 Convert fx_random.cpp to use safe types
  • aecfce306 Use std::array<> in fx_coordinates.cpp.
  • e0742615a Add missing includes uncovered by libc++ change
  • ca0dc045d Roll third_party/skia/ a9db1213b..6279c88b9 (349 commits)
  • a747ba711 Roll build/ 9ca0d2ce9..386c65667 (118 commits)
  • f283eab76 Add UNSAFE_BUFFER annotations to fx_dib.h
  • 4ccd18a00 Move even more code still into StringTemplate.
  • 5488b8f20 Get rid of pointer arithmetic in *MSBFIRST() and *LSBFIRST() macros.
  • b031c22a8 Give better error diagnostic in cpdf_dictionary.h
  • df0228d9b Put GetBuffer() and ReleaseBuffer() in StringBaseTemplate
  • 64571d5d1 Avoid adding stream objects directly to arrays in CPDF_SyntaxParser
  • 88b642dd8 Roll tools/clang/ 2b9d966ec..ff84dc245 (41 commits)
  • 457ff0f6e Place common code for byte/wide strings in StringTemplate.
  • 4306e55b5 Combine FX_wcspos() and FX_strpos() into fxcrt::spanpos().
  • 5299db5f1 Encapsulate FT_Set_Pixel_Sizes()
  • 56f5c3b67 Roll Zlib from 956936c53cb6 to 646b7f569718 (3 revisions)
  • aad37f1a2 Move WideString::WStringLength() to cpdfsdk_helpers.cpp
  • c3bf5b2ae Add runtime check for streams in CPDF_Array::SetAtInternal() and friends
  • 778a2f631 Do not let CPDF_Array::SetNewAt() and friends take a CPDF_Stream
  • ba0b98cbc Make RenderDeviceDriverIface::SetDIBits() take RetainPtrs by value
  • 9dfb129b5 Return RetainPtr<> from StringData::Create()
  • c764fe091 Avoid UNSAFE_BUFFER operations in core/fxcrt/{byte,wide}string.h
  • 467e8dde5 Remove ByteString::AllocCopy() and WideString::AllocCopy().
  • bb51448d6 Ensure CPDF_Stream's dictionary is always a direct object
  • 4fbdcdcbf Give "V4" and "V5" parser code better names
  • 244491fa8 Mark CVE-2023-52355 as mitigated in third_party/libtiff/METADATA
  • d85e88249 Fix PDF loading when an initial xref stream references a xref table
  • 24c6be692 Switch from absl::optional to std::optional
  • db46cc55f Add another pixel test for incorrect cross reference stream handling
  • 907b76519 Sync Chromium's include_rules for Abseil
  • 59f3856c9 Spanify FX_strstr() and FX_wcsstr()
  • 35d21add5 Avoid potential msan warnings in test SpanEquals.Empty
  • 4097f1d49 Add new base::span<> functions to pdfium::span<>.
  • 0a15a0573 Roll buildtools/, third_party/libc++/src/, third_party/libc++abi/src/
  • 2f1b073ae Add improvements to core/fxcrt/span_util.h
  • 03a847d67 Tidy some code in fx_crypt_aes.cpp
  • 187fa9288 Introduce UNSAFE_BUFFERS() macro to PDFium.
  • 4282836f3 Roll Depot Tools from 35a530663508 to af6eabff5313 (49 revisions)
  • 416a9d4d5 Roll Code Coverage from 2bd00824f032 to 76f45e718405 (1 revision)
  • 4a3765ad9 Roll tools/rust/ e721a72ad..bcaf16e55 (9 commits)
  • 5d809a2bc Remove limit on number of form XObjects within a form XObject
  • 4c76a8ffe Update reclient_version to 0.130.0.546556b-gomaip
  • 8a4b1b742 Roll third_party/libunwind/src/ 2602aecdf..fc505746f (7 commits)
  • 8017ac552 Roll gn from 85944ebc24a9 to a2e2717ea670
  • c385302dc Roll third_party/abseil-cpp/ b7ad4e9ef..d391aa34a (8 commits)
  • 4048722ad Roll third_party/freetype/src/ ca76683b7..47574f7ea (10 commits)
  • 2a585a8e5 Ignore /Prev for hybrid-reference files
  • 815cc45c3 Revert ProcessCrossRefV5Entry() overwrite change
  • a8e1f1379 Add pixel test for an edited PDF that regressed