Dear Maintainer,
On a PDF file generated by inkscape, pdfposter fails here with this error:
$ pdfposter workers.pdf -v -s2.25 -m Let foo.odf
---- processing page 1 -----
Deciding for 3 columns and 2 rows of portrait pages.
Traceback (most recent call last):
File "/usr/bin/pdfposter", line 33, in <module>
sys.exit(load_entry_point('pdftools.pdfposter==0.8.1', 'console_scripts', 'pdfposter')())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/share/pdfposter/pdftools/pdfposter/cmd.py", line 192, in run
main(args, infilename=args.infilename, outfilename=args.outfilename)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pdfposter/pdftools/pdfposter/__init__.py", line 350, in main
posterize(outpdf, page, opts.media_size, opts.poster_size, opts.scale,
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opts.use_ArtBox)
^^^^^^^^^^^^^^^^
File "/usr/share/pdfposter/pdftools/pdfposter/__init__.py", line 282, in posterize
_scale_pdf_page(outpdf, page, scale)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/pdfposter/pdftools/pdfposter/__init__.py", line 257, in _scale_pdf_page
content = ContentStream(page["/Contents"].get_object(), None)
File "/usr/lib/python3/dist-packages/pypdf/generic/_data_structures.py", line 1198, in __init__
stream_data = stream.get_data()
File "/usr/lib/python3/dist-packages/pypdf/generic/_data_structures.py", line 1418, in get_data
new_data.write(operator)
~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'
I tried removing and re-installing the package, with no effect.
Google AI suggests:
The error a bytes-like object is required in pdfposter typically
occurs because of a conflict between Python 2 and Python 3 or an
outdated dependency. The issue arises because Python 3 strictly
distinguishes between strings (Unicode text) and bytes (binary data),
while Python 2 did not. 
Solution 1: Use an updated version
The most direct cause of this error is using an old version of
pdfposter that was built for Python 2. Versions 0.7 and earlier did
not support Python 3 and used an outdated library (pyPdf). A fix was
implemented in version 0.8 to make it Python 3 compatible by switching
to PyPDF2.
I see there have been several new versions released this summer.
Pdfposter version 0.9 included a port to version 3 of the pypdf
library, so I expect just packaging a current version would fix the
problem.
We believe that the bug you reported is fixed in the latest version of pdfposter, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1112477@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Alexandre Detiste <tchet@debian.org> (supplier of updated pdfposter package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Sat, 06 Sep 2025 00:11:17 +0200 Source: pdfposter Architecture: source Version: 0.9.1-1 Distribution: unstable Urgency: medium Maintainer: Debian Python Team <team+python@tracker.debian.org> Changed-By: Alexandre Detiste <tchet@debian.org> Closes: 1112476 1112477 Changes: pdfposter (0.9.1-1) unstable; urgency=medium . * Team upload. * New upstream version 0.9.1 (Closes: #1112476, #1112477) * Drop explicit dependency on libjs-jquery Checksums-Sha1: a695b0c07e78ed979d1a386f9c6fb21fa95a255b 2156 pdfposter_0.9.1-1.dsc ed7e45d504dfbad87c89a12b11926d272cd1dabe 247550 pdfposter_0.9.1.orig.tar.gz 63d72ea75512a364b5dbd322b877fe437b692608 8588 pdfposter_0.9.1-1.debian.tar.xz 51522bd0f496b3d853f8c30f808e121ae6428a3f 6535 pdfposter_0.9.1-1_source.buildinfo Checksums-Sha256: 13dd55b7e67767e2c6d12a9c735eb3b9f4acd23440189a0b0dcf9a3d52e81b84 2156 pdfposter_0.9.1-1.dsc 947d3a648cee932105116c1ad20c3d5b0b6b09c120d537d634c6447cf861fd36 247550 pdfposter_0.9.1.orig.tar.gz 47a263a2d45d4433d45b5ee9c92d5c58fff70f027fc1e18086b76479feb600f2 8588 pdfposter_0.9.1-1.debian.tar.xz 421b80197659cbcb32a2f1a6028a6d17cec43046c41c41ac214cdbb274ce28d0 6535 pdfposter_0.9.1-1_source.buildinfo Files: 2ddada6762aebc04dc9948eeda13f851 2156 python optional pdfposter_0.9.1-1.dsc 3c9a2db9002a9eaf2f4850225e914a57 247550 python optional pdfposter_0.9.1.orig.tar.gz 557ef87b5941e1501e862219abfe6d52 8588 python optional pdfposter_0.9.1-1.debian.tar.xz 13d53570ee953d2ea7823e0cd0a76d74 6535 python optional pdfposter_0.9.1-1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEEj23hBDd/OxHnQXSHMfMURUShdBoFAmi8ThQRHHRjaGV0QGRl Ymlhbi5vcmcACgkQMfMURUShdBoE+BAAsq+2xgnW7jfijxPFFToPolo4PF5ZxJZc vZNDPcGKQvML6/7+JM1Y2Y3AS9zraDW79PsI4jN4lW3PdGG9IGAUR99RuCjxv+mi ajFX55g66RJE6GUPlmZ19Fum+zbkaJZYd5zNd8JpERUeNrQxPzttK6nTGdW7ohAv 4Ibf7fYbpVpa43boh6jqQOJdXmVPNPDlod9HIAL20IbEM2yLx78vwd+TzKxXFH8r rbqL2+KB3PA07ZxkhX/dtEesktbhj6og6Ng55y0kQU1Trsy2+H7viCk2DcOyEH+F QC873/xW2Nx/m6LOY2JPPQ2KJJmw7mke6Ak8smVodsCZcfsw6LgYqWQG/y3/dlfW MzG2onbt+ZBwQ73HdxAvPFpn/u62L+kx09s+8NpPeB8NkLyaFpujac++sSQRDq1U PE2CxUyw3lhXaU+62UCwu7uZjHz0Zf60dlhX3CgmCeS9d3hZsW3dEE9SwLRkzxOE Jl97nS8ZkgU2nu3SS9mheNi6nlux2ujKQDO8IEM+Hg9wBxWg45zzm549cIHhMEeI Iffe9/M2XksR2uvU6TrEKc4gRlLP7EZjYuWtsUHO8RhV3atL+6qFD6cZfAjbUYcg kgoNHwMooGUG13lafYKjByahiZQwSGQKL8BYQ9JLy6lLTbDVNmalD2hHsd7Tpu/g aw97IwLYpNI= =MRTg -----END PGP SIGNATURE-----