PyPDF4 icon indicating copy to clipboard operation
PyPDF4 copied to clipboard

A utility to read and write PDFs with Python

Results 50 PyPDF4 issues
Sort by recently updated
recently updated
newest added

I'm dealing with a collection of PDF files that contain invalid bookmarks: in Acrobat, they show in the bookmark tree, but the bookmark properties shows that they have no destination....

When merging pdf files, the bookmarks from sourcefiles are inherited correctly but they don't point to any page. Also bookmarks that are created while appending files to the merger don't...

``` [..., canvas, bytesio(), ...] can.save() new_pdf = PdfFileReader(packet) # Open template pdf existing_pdf = PdfFileReader(open(input_pdf_path, "rb"), strict=False) output = PdfFileWriter() # get first page of template page = existing_pdf.getPage(0)...

Added sample code that copies a PDF, changing field values along the way (i.e. using a PDF with fillable fields as a template). This required modifying the PdfFileWriter.updatePageFormFieldValues() method (in...

The PDF file is attached [pdf_sample_googlesheet_pages_02.pdf](https://github.com/claird/PyPDF4/files/4984802/pdf_sample_googlesheet_pages_02.pdf) traceback: File "/usr/local/lib/python3.8/site-packages/PyPDF2/pdf.py", line 1599, in getObject idnum, generation = self.readObjectHeader(self.stream) File "/usr/local/lib/python3.8/site-packages/PyPDF2/pdf.py", line 1667, in readObjectHeader return int(idnum), int(generation) ValueError: invalid literal for...

Add a method to remove a page by number. It would be helpful if you added more pages than you want.

https://github.com/claird/PyPDF4/blob/9c60d9df3a56edd32226c9e76695018f997fafe6/pypdf/generic.py#L960-L963 Hi, sorry but I am not familiar with PDF formats whatsoever. Is there a reason this isn't supported yet? Can we just take some bytes, reapply the compression/encoding and...

An exception is thrown when decoding objects with a ASCIIHEXCodec: ``` File "c:\users\dcmvd\documents\github\pypdfplot\pypdfplot\classes.py", line 173, in extractEmbeddedFiles fdata = fobj.getData() File "c:\users\dcmvd\documents\github\pypdf4\pypdf\generic.py", line 950, in getData decoded._data = decodeStreamData(self) File...

As stated in the title, pdf.strict in DictionaryObject.readFromStream (at line 667 in generic.py) raises an AttributeError because the parameter pdf as received is None. Going back, this comes from ContentStream.__parseContentStream...