chore(deps): update dependency pikepdf to v10 - #969
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
2 times, most recently
from
December 24, 2025 11:57
431e967 to
c3736ec
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
January 10, 2026 10:45
c3736ec to
9ac6146
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
January 30, 2026 11:48
9ac6146 to
1c1d631
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
March 14, 2026 14:08
1c1d631 to
cfcc04b
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
March 31, 2026 16:35
cfcc04b to
90dbbbc
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
2 times, most recently
from
May 21, 2026 08:14
7ca06f7 to
3175aa3
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
2 times, most recently
from
May 25, 2026 23:50
3096642 to
352861c
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
2 times, most recently
from
June 12, 2026 13:55
76e8a19 to
c483a67
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
June 20, 2026 10:56
c483a67 to
ac751ef
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
July 17, 2026 23:37
ac751ef to
4438787
Compare
renovate
Bot
force-pushed
the
renovate/pikepdf-10.x
branch
from
August 1, 2026 12:12
4438787 to
109b6fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==6.2.9→==10.11.0Release Notes
pikepdf/pikepdf (pikepdf)
v10.11.0Compare Source
v10.10.0Compare Source
Behavior change
pikepdf.PdfImage.as_pil_imageand {meth}pikepdf.PdfImage.extract_tonow apply an image's soft mask (
/SMask) or explicit/colour-key mask(
/Mask) by default, returning an image with an alpha channel (LAorRGBA) and writing a transparency-capable format (.png). Previouslythe mask was silently ignored and the opaque base image was returned. Images
without a mask are unaffected. Pass
apply_mask=Falseto recover the oldbehavior and obtain only the opaque base image.
New features
/SMasksoft masks,/Maskstencil (explicit) masks, and/Maskcolour-key masks arecomposited into an alpha channel. Soft-mask images whose resolution differs
from the base image are resampled to match (ISO 32000-2 §8.9.6).
/CalRGB,/CalGrayand/CalCMYKimages, whichpreviously raised
NotImplementedError. The samples are decoded as theirdevice equivalents, and for CalRGB/CalGray an ICC profile synthesized from
the colour space's
WhitePoint/Gamma/Matrixis attached to theextracted image so the calibration is preserved for colour-managed consumers.
/Labcolour space, extracted as a PillowLABimage (saved as TIFF) with the PDF
L*/a*/b*ranges remapped toPillow's conventions.
losslessly as Pillow
I;16; 16-bit RGB and CMYK are reduced to 8-bit (witha warning) because Pillow has no higher-bit-depth raw mode for them.
NotImplementedError: ICCBased CMYK images and indexed images now producethe correct default
/Decodearray, and inline images that name theircolour space now resolve it from the in-scope
/Resourceswhen obtained via{func}
pikepdf.parse_content_stream./DCTDecode) images with a non-default/ColorTransform-- a YCCKCMYK or a non-YCbCr RGB JPEG -- are now decoded via Pillow (which honours the
JPEG's own markers) and transcoded, instead of failing to extract.
/DCTDecode,/CCITTFaxDecode,/JPXDecode,/JBIG2Decode) in any number ofgeneralized/specialized filters (Flate, LZW, ASCII85/Hex, RunLength) are now
peeled and extracted seamlessly.
pikepdf.PdfImage.MAX_IMAGE_PIXELS, a settable class-level limiton the number of pixels pikepdf will decode from a single image. Until set,
it defaults to
max(500_000_000, PIL.Image.MAX_IMAGE_PIXELS)-- a floorsuited to high-DPI scanned PDFs -- and tracks Pillow's setting; once assigned
it becomes independent of Pillow. Set it to
Noneto disable the check.pikepdf.Arraynow implements the standard Pythonlistinterface:slicing (including
delon slices and slice assignment), and theclear(),count(),index(),insert(),pop(),remove(),and
reverse()methods.Limitations
/SMaskInData(alpha encoded inside a JPEG 2000 stream) is applied onlywhen Pillow's JPEG 2000 decoder surfaces the alpha channel itself; a
pre-multiplied (
SMaskInData 2) result is not un-premultiplied. A/Matteentry on a soft mask is not undone (a warning is emitted). When animage has both an
/SMaskand a/Mask, the soft mask takes precedence.Colour-key masking is applied only to 8-bit
L/RGB/CMYKimages.[/DCTDecode /CCITTFaxDecode]) cannot be decoded by any reader and nowraises {class}
~pikepdf.exceptions.UnsupportedImageTypeErrorrather thanNotImplementedError.Security
attacks. A malicious PDF could declare an image with enormous
/Widthand/Heightso that {meth}pikepdf.PdfImage.as_pil_imageattempted toallocate many gigabytes before reading the (tiny) image stream. pikepdf now
enforces a configurable pixel limit, {attr}
pikepdf.PdfImage.MAX_IMAGE_PIXELS(analogous to
PIL.Image.MAX_IMAGE_PIXELS), across every image-decodepath -- including the 2/4-bit transcoding path, 1-bit and 8-bit images, and
the Pillow-decoded JPEG/JPEG2000/CCITT path. Oversized images raise
{exc}
pikepdf.DecompressionBombErrorand borderline images emit{exc}
pikepdf.DecompressionBombWarning(both subclass Pillow's equivalents).(#733)
Fixed
[/FlateDecode /CCITTFaxDecode]) now builds its TIFF header from the/CCITTFaxDecodefilter's own/DecodeParmsrather than the leading filter's,which previously produced a corrupt extraction.
pikepdf.StreamDecodeLevel: thespecializedandalllevels were each described with the other's behavior.SIGABRTviastd::terminate) that could occur when afile-backed {class}
pikepdf.Pdfwas deallocated while a Python exception wasalready propagating -- for example when
pikepdf.open(filename)appears as atransient element of a list/tuple literal whose later element raises. Opening
from a filename closes the file in the input source destructor, which calls
back into Python; with an exception already in flight that call raised an error
that escaped the destructor. The in-flight exception is now preserved and
propagates normally. (#732) Added a guard for a likely non-reproducible related
case with DecimalPrecision.
v10.9.1Compare Source
v10.9.0Compare Source
New features
Added {class}
pikepdf.JobBuilder, a fluent, Pythonic builder for qpdf jobs.It assembles a job specification with chained, snake_case methods (
input,output,encrypt,add_pages,split_pages,linearize,compress,add_attachment,add_overlay,limits, ...) and runs itvia the existing {class}
pikepdf.Job, without hand-writing qpdf's camelCasejob JSON. Encryption permissions are expressed with the familiar
{class}
pikepdf.Permissions/{class}pikepdf.Encryptionmodels, and a.set(**kwargs)escape hatch reaches any other job option. Additionalmethods cover image optimization (
optimize_images,externalize_inline_images), page/content transforms(
flatten_annotations,flatten_rotation,generate_appearances,coalesce_contents,normalize_content), content removal(
remove_metadata,remove_info,remove_acroform,remove_structure,remove_page_labels), page labels(
set_page_labels), version control (min_version,force_version),and reproducible/inspection helpers (
deterministic_id,static_id,check).Exposed several pieces of qpdf functionality that pikepdf had not previously
bound:
pikepdf.Pdf.write_qpdf_json,{meth}
pikepdf.Pdf.from_qpdf_jsonand {meth}pikepdf.Pdf.update_from_qpdf_jsonserialize and reconstruct an entire PDF as qpdf JSON (the
qpdf --json-output/--json-inputformat, version 2). This complements theexisting object-level {meth}
pikepdf.Object.to_json. Added{class}
pikepdf.JSONStreamDatato control how stream data is represented.pikepdf.Pdf.get_xref_tablereturns the cross-reference table asstructured data ({class}
pikepdf.XrefEntry), complementing the print-only{meth}
pikepdf.Pdf.show_xref_table.pikepdf.Pdf.fix_dangling_referencesrepairs references to objectsthat are not present in the file.
pikepdf.Page.flatten_rotationbakes a page's/Rotatevalue into itscontent stream.
pikepdf.Page.copy_annotationscopies annotations (and associated formfields) from another page, applying a transformation matrix.
pikepdf.Page.get_matrix_for_transformationsand{meth}
pikepdf.Page.get_matrix_for_form_xobject_placementexpose qpdf'spage/form-XObject placement matrices.
pikepdf.AcroForm.validate,{meth}
pikepdf.AcroForm.invalidate_cacheand{meth}
pikepdf.AcroForm.transform_annotationsfor working with interactiveforms after manual structural edits.
Added {meth}
pikepdf.Page.get_images, which by default recurses into nestedform XObjects to find images. The {attr}
pikepdf.Page.imagesproperty is nowdeprecated: it only reports images referenced directly by the page and
silently omits images drawn through form XObjects, which made it appear as if a
page "has no images" when it clearly did. Use
get_images()instead, orget_images(recursive=False)for the old behavior.Added {attr}
pikepdf.Page.rotation, a property that reports a page's effectiveclockwise rotation normalized to
[0, 360). Unlike the rawpage.Rotateattribute, it resolves a
/Rotatevalue inherited from the page tree andreports
0when no rotation is set, instead of raising. Assigning to it setsthe absolute rotation. This addresses the long-standing confusion between the
page.Rotateattribute and thepage.rotate()method (#467).{meth}
pikepdf.Page.rotatenow defaultsrelativetoFalse, sopage.rotate(90)sets an absolute rotation. Passingrelativeas apositional argument is deprecated and emits a
DeprecationWarning; pass itas a keyword argument instead, e.g.
page.rotate(90, relative=True).Positional support will be removed in pikepdf 11.
Added {meth}
pikepdf.Pdf.add_pages_fromto copy pages between documents whilepreserving interactive AcroForm form fields, returning a
{class}
pikepdf.PageCopyResult. Naivepages.extend()across documents andsave()of documents with orphaned form widgets now emit{class}
pikepdf.PageCopyWarning. (#670, #207)When copying pages, named destinations referenced by the copied pages'
annotations (e.g. table-of-contents links) are now carried into the
destination document — both the PDF 1.2
Names.Destsname tree and thelegacy PDF 1.1
Root.Destsdictionary — so internal links keep workingregardless of merge order. Name collisions are renamed and reported via
{class}
pikepdf.PageCopyResult(named_dests_added,renamed_dests,dropped_dests). Naivepages.extend()now also warns when copied pagesreference named destinations. (#148)
Fixes
/Decodearray, which caused colors tobe inverted (or otherwise mismapped) when a PDF specified a non-default
/Decodesuch as[1, 0]. {meth}pikepdf.PdfImage.as_pil_imageand{meth}
pikepdf.PdfImage.extract_tonow apply/Decodeas a linearper-channel mapping for grayscale, RGB and CMYK raster images, matching how a
PDF viewer renders the image. Previously
/Decodewas honored only forCCITTFax-encoded images. Thanks to Mark-Joy for the report. {issue}
650Both methods gained an
apply_decode_arrayparameter (defaultTrue).Pass
apply_decode_array=Falseto retrieve the raw stored sample valueswith the least processing -- useful for forensic inspection of the underlying
image data.
Some image types are intentionally not affected: Indexed-colorspace images
(where
/Decoderemaps palette indices rather than colors -- a non-identity/Decodethere now emits a warning), and DCT (JPEG) / JPX (JPEG 2000)images, whose codecs carry their own color semantics (such as the Adobe APP14
marker for inverted CMYK) that Pillow already honors; re-applying
/Decodewould double-invert them.
pikepdf.Pdf.savedecompressing streams when called withcompress_streams=Falseand no explicitstream_decode_level. qpdf 11.10changed its default stream decode level to
generalized, which caused suchsaves to decompress (without recompressing) streams and balloon the output
file. pikepdf now pins the decode level to
nonein this case, restoring thedocumented behavior that
compress_streams=Falsealone does not triggerdecompression. Fixes {issue}
676.{meth}
pikepdf.AcroForm.validatebinding calls qpdf'sQPDFAcroFormDocumentHelper::validate, which was added in qpdf 12.3.0, sopikepdf no longer builds against older qpdf releases.
Documentation
from the page tree, but a page that is still referenced by an outline
(bookmark), link annotation, or named destination remains in the saved file.
The {ref}
Deleting pages <deleting_pages>topic now explains the behavior andgives workarounds. Thanks to m-holger. Closes {issue}
196.{ref}
Copying metadata between documents <copymetadata>topic, including whyblindly copying all fields (or the raw XMP stream) can import false conformance
claims and identifiers. Closes {issue}
188.v10.8.0Compare Source
v10.7.3Compare Source
v10.7.2Compare Source
v10.7.1Compare Source
3.12 and 3.13 due to open issue in nanobind. Fixes :issue:
723. Thanks@mgorny for reporting.
build) which has more assertions and would have uncovered this issue.
v10.7.0Compare Source
v10.6.0Compare Source
v10.5.1Compare Source
v10.5.0Compare Source
ctmmodule using__file__instead of__name__,which produced unhelpful log names. :issue:
712v10.3.0Compare Source
v10.2.0Compare Source
v10.1.0Compare Source
v10.0.3Compare Source
v10.0.2Compare Source
v10.0.1Compare Source
v10.0.0Compare Source
v9.11.0Compare Source
v9.10.2Compare Source
v9.10.1Compare Source
v9.10.0Compare Source
v9.9.0Compare Source
v9.8.1Compare Source
v9.8.0Compare Source
v9.7.0Compare Source
v9.6.0Compare Source
v9.5.2Compare Source
Full Changelog: pikepdf/pikepdf@v9.5.1...v9.5.2
Manually created due to irrelevant CI build failure
v9.5.1Compare Source
Full Changelog: pikepdf/pikepdf@v9.5.0...v9.5.1
v9.5.0Compare Source
v9.4.2Compare Source
v9.4.1Compare Source
v9.4.0Compare Source
v9.3.0Compare Source
v9.2.1Compare Source
v9.2.0Compare Source
v9.1.2Compare Source
v9.1.1Compare Source
v9.1.0Compare Source
v9.0.0Compare Source
v8.15.1Compare Source
v8.15.0Compare Source
v8.14.0Compare Source
v8.13.0Compare Source
v8.12.0Compare Source
v8.11.2Compare Source
v8.11.1Compare Source
v8.11.0Compare Source
v8.10.1Compare Source
v8.10.0Compare Source
v8.9.0Compare Source
v8.8.0Compare Source
v8.7.1Compare Source
v8.7.0Compare Source
v8.6.0Compare Source
v8.5.3Compare Source
v8.5.2Compare Source
v8.5.1Compare Source
v8.5.0Compare Source
v8.4.1Compare Source
v8.4.0Compare Source
v8.3.2Compare Source
v8.3.1Compare Source
v8.3.0Compare Source
v8.2.3Compare Source
v8.2.2Compare Source
v8.2.1Compare Source
v8.2.0Compare Source
v8.1.1Compare Source
v8.0.0Compare Source
v7.2.0Compare Source
v7.1.2Compare Source
v7.1.1Compare Source
v7.1.0Compare Source
v7.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.