Open ms3534 opened 1 year ago
@ms3534 , PyPDF4 is no more active whereas PyPDF2 is. I've tried your test file in PyPDF2 and the error is confirmed there too. I will analyze the issue and try to produce a fix ; to do that can you duplicate the issue in https://github.com/py-pdf/PyPDF2 ?
also this code is a minimized test version
from PyPDF2 import PdfFileReader, PdfFileMerger
merger = PdfFileMerger()
merger.append(PdfFileReader(open('C:\file-0.pdf', 'rb')))
Thanks @pubpub-zz, added a ticket on PyPDF2: https://github.com/py-pdf/PyPDF2/issues/1145
import os from PyPDF4 import PdfFileReader, PdfFileMerger from PIL import Image from PIL import ImageFile import argparse import string import collections
def png_to_pdf(): merger = PdfFileMerger() merger.append(PdfFileReader(open('C:\file-0.pdf', 'rb')))
def main(): png_to_pdf()
main()