-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PdfReadWarning: Superfluous whitespace found in object header b'1' b'0' [pdf.py:1666] #576
Comments
got the same issue. Can any please advise how to resolve it? |
Well I had the same problem, since I was trying to stamp a template PDF (made by me), on an existing one. Hope it helps. EDIT: |
Hi, for I have plenty of pdffiles, I want to find out all the content in pdffiles, but your solution can not be used as normal operation. Do you have any better code solution instead of treating the file by hand. Thanks |
Could somebody add a minimal Python script that shows the issue with the given files? |
Here is the code that gave me the subjected problem. I more or less randomly added a pdf file with 4 pages. I also got the error when using a single-paged PDF-file, and where the resulting file was OK. from PyPDF2 import PdfFileReader, PdfFileWriter,PdfFileMerger
template = PdfFileReader(open('PythonHelp.pdf','rb'))
watermark = PdfFileReader(open("FactuurModelIkke.pdf", 'rb'))
output = PdfFileWriter()
for i in range(template.getNumPages()):
page = template.getPage(i)
page.mergePage(watermark.getPage(0))
output.addPage(page)
file = open('waterMarked_PDF.pdf', 'wb')
output.write(file) FactuurModelIkke.pdf Hope you can solve this. |
Hello - i have the same problem. |
@Rapid1898-code "me too" comments don't provide any value. They distract and prevent devs from working on the issue. If you want to help, please provide a full minimal example:
|
I met the same issue. |
All, |
All, |
I just checked with the current |
I've just executed the MCVE example from the first post with the latest version of PyPDF2. Seems to work 🎉 |
Hi all,
I coverting pdf file to text for processing. code was workig fine an drecently it started giving errors like below and not text extraction
PdfReadWarning: Superfluous whitespace found in object header b'1' b'0' [pdf.py:1666]
MCVE
my pdf file and process code are attached
pdf2txt.py.txt
TN_24.08.2020.pdf
Thanks in advance
The text was updated successfully, but these errors were encountered: