Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected] Control: affects -1 + src:pdfposter User: [email protected] Usertags: pu
[ Reason ] pdfposter fails to work with the trixie version of pypdf (which is the main dependency it is built around). [ Impact ] A use case that fails with a TypeError is reported in #1143875. [ Tests ] Run the test reported in #1143875. With the patch applied it does not fail. [ Risks ] The additional patch is an upstream patch and just has changes from str to bytestrings. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] Adds an upstream patch with the changes for the correct pypdf 5 API calls.
diff -Nru pdfposter-0.8.1/debian/changelog pdfposter-0.8.1/debian/changelog --- pdfposter-0.8.1/debian/changelog 2025-02-10 06:46:43.000000000 +0100 +++ pdfposter-0.8.1/debian/changelog 2026-11-21 22:19:05.000000000 +0100 @@ -1,3 +1,9 @@ +pdfposter (0.8.1-4+deb13u1) trixie; urgency=medium + + * Backport fix for pypdf >= 5 (Closes: #1143875) + + -- Bastian Germann <bage@adam> Sat, 21 Nov 2026 22:19:05 +0100 + pdfposter (0.8.1-4) unstable; urgency=medium * Team upload. diff -Nru pdfposter-0.8.1/debian/patches/pypdf-5.patch pdfposter-0.8.1/debian/patches/pypdf-5.patch --- pdfposter-0.8.1/debian/patches/pypdf-5.patch 1970-01-01 01:00:00.000000000 +0100 +++ pdfposter-0.8.1/debian/patches/pypdf-5.patch 2026-11-21 22:18:20.000000000 +0100 @@ -0,0 +1,34 @@ +Origin: upstream, 0b1a0fa6ced45f49d6bf2a8c9d18208167ec856f +From: Hartmut Goebel <[email protected]> +Date: Tue, 22 Jul 2025 19:37:19 +0200 +Subject: Fix for pypdf >= 5. +--- +--- a/pdftools/pdfposter/__init__.py ++++ b/pdftools/pdfposter/__init__.py +@@ -235,12 +235,12 @@ def copyPage(page): + def _clip_pdf_page(page, x, y, width, height): + content = ContentStream(page["/Contents"].get_object(), None) + content.operations[:0] = [ +- ([], 'q'), # save graphic state +- (RectangleObject((x, y, width, height)), 're'), # rectangle path +- ([], 'W*'), # clip +- ([], 'n'), # cancel path w/ filling or stroking ++ ([], b'q'), # save graphic state ++ (RectangleObject((x, y, width, height)), b're'), # rectangle path ++ ([], b'W*'), # clip ++ ([], b'n'), # cancel path w/ filling or stroking + ] +- content.operations.append([[], "Q"]) # restore graphic state ++ content.operations.append([[], b'Q']) # restore graphic state + page[NameObject('/Contents')] = content + + +@@ -257,7 +257,7 @@ def _scale_pdf_page(outpdf, page, factor): + #print boxname, type(box), box + # put transformation matrix in front of page content + content = ContentStream(page["/Contents"].get_object(), None) +- content.operations.insert(0, [[], '%f 0 0 %f 0 0 cm' %(factor,factor)] ) ++ content.operations.insert(0, [[], b'%f 0 0 %f 0 0 cm' %(factor,factor)] ) + content = content.flate_encode() + # Add changed content as an indirect object. So the content will + # be referenced by the other pages and not copied. The content diff -Nru pdfposter-0.8.1/debian/patches/series pdfposter-0.8.1/debian/patches/series --- pdfposter-0.8.1/debian/patches/series 2025-02-05 19:53:07.000000000 +0100 +++ pdfposter-0.8.1/debian/patches/series 2026-11-21 22:17:07.000000000 +0100 @@ -1,2 +1,3 @@ Port-to-pypdf.patch Sphinx-configuration.patch +pypdf-5.patch

