CLI tool to extract (meta)data from PDF and manipulate PDF files
BSD 3-Clause "New" or "Revised" License
108
stars
18
forks
source link
In the cat subcommand, replace the usage of the deprecated PdfMerger class from pypdf #31
Closed
Lucas-C closed 11 months ago
PdfMerger
is used in the in thecat
subcommand: https://github.com/py-pdf/pdfly/blob/main/pdfly/cat.py#L51But this class is deprecated in
pypdf
since version 3.9.1: https://github.com/py-pdf/pypdf/releases/tag/3.9.1We should replace it by combining
PdfReader
, itsmerge_page()
method &PdfWriter
frompypdf
. An example of code using those can be found there: https://py-pdf.github.io/fpdf2/CombineWithPypdf.htmlExtra unit tests could be added in the process in https://github.com/py-pdf/pdfly/blob/main/tests/test_cat.py in order to ensure that
pdfly cat
still works similarly as it currently does.