PyPDF2 fail sometimes with decryption of some PDF files, and I am trying do decrypt them with pikepdf but I am getting this error: Unable to find trailer dictio
I have used this below code. from PyPDF2 import PdfFileWriter, PdfFileReader from PyPDF2.generic import BooleanObject, NameObject, IndirectObject def set_need
I want to add a metadata key-value pair to the metadata of a pdf file. I found a several years old answer, but I think this is way to complicated. I guess ther
I am trying to use Python to merge multiple PDFs at specific pages I want. So for instance, let's say we have 3 pdfs and I want to merge the second one at page
Based on https://programtalk.com/python-examples/PyPDF2.PdfFileWriter/, example 2, I try to to add an attachment into a PDF file. Here is my code I am trying to
I'm trying to get PyPDF2 to read a small .pdf file that is within a simple zip file. Here's what I've got so far: import PyPDF2,zipfile with zipfile.ZipFile("T
I am trying to split a pdf into its pages and save each page as a new pdf. I have tried this method from a previous question with no success and the pypdf2 spli
I have a multi-page .pdf (scanned images) containing handwriting I would like to crop and store as new separate images. For example, in the visual below I would
I'm using PyPDF2 to alter a PDF document (adding bookmarks). So I need to read in the entire source PDF, and write it out, keeping as much of the data intact as
I am using PyPDF2 for extract text from pdf. All examples which I found in the google look like my code: import PyPDF2 reader = PyPDF2.PdfFileReader("test2.pd
I want to convert a pdf file to text by PyPDF2 but converted text looks differents from PDF file. Specifically, one line in PDF is broken into multiple lines in
I'm trying to add a bookmark to a PDF using PyPDF2. I run the following with no problems. But a bookmark is never created. Any thoughts on what I'm doing wrong.
I a trying to read a PDF document using Python with PyPDF2 package. The objective is to read all the bookmarks in the pdf and construct a dictionary with page n
I am trying to modify text in a PDF file. The text can be in an object of type Tj or BDC. I find the correct objects and if I read them directly after changing
I have a pdf file and I need to edit some text/values in the pdf. For example, in the pdfs that I have "BIRTHDAY DD/MM/YYYY" is always "N/A". I want to change i
I would like to read the pdf file. This is a book.pdf with a password (256 bit AES encryption). I know a password. I am using Jupyter Notebook. I get an error:
I am trying to strip out only the first page of multiple PDF files and combine into one file. (I receive 150 PDF files a day, the first page is the invoice whic
I'm try to adding watermark to every pages of my PDF file.My PDF files have 58 pages but my output file has get only last page in my PDF file. This's my code:
I'm trying to extract Text from a PDF using Python, and I have successfully done so using PyPDF2 like this: from PyPDF2 import PdfFileReader reader = PdfFileRea
I wish to concatenate (append) a bunch of small pdfs together effectively in memory in pure python. Specifically, an usual case is 500 single page pdfs, each wi