Skip to content
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

ValueError: invalid literal for int() with base 10: "5347+01'00')>>" #262

Closed
StErMi opened this issue May 18, 2016 · 2 comments
Closed

ValueError: invalid literal for int() with base 10: "5347+01'00')>>" #262

StErMi opened this issue May 18, 2016 · 2 comments
Labels
is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

Comments

@StErMi
Copy link

StErMi commented May 18, 2016

Hi

I've got a problem while reading (to merge with another) a PDF. This is the instruction that will generate the error:

pdf_merger.append(PdfFileReader(temp_file, strict=False), import_bookmarks=False)

This is the stacktrace:

pdf_merger.append(PdfFileReader(temp_file, strict=False), import_bookmarks=False)
  File "C:\Users\Emanuele\Envs\tr\lib\site-packages\PyPDF2\pdf.py", line 1065, in __init__
    self.read(stream)
  File "C:\Users\Emanuele\Envs\tr\lib\site-packages\PyPDF2\pdf.py", line 1774, in read
    idnum, generation = self.readObjectHeader(stream)
  File "C:\Users\Emanuele\Envs\tr\lib\site-packages\PyPDF2\pdf.py", line 1638, in readObjectHeader
    return int(idnum), int(generation)
ValueError: invalid literal for int() with base 10: "5347+01'00')>>"

Unfortunately I cannot share the test PDF becuase has some sensitive data. What I can tell it's that has a lot of whitespaces in the latest page.

I'm using the latest version of PyPDF2 installed via PIP: PyPDF2==1.25.1

@mstamy2
Copy link
Collaborator

mstamy2 commented May 20, 2016

See my comment from #183

You're welcome to send me the PDF privately, and I can work with it securely.

If that's not an option, then locating the line in the file that PyPDF2 crashes on and sending a snippet would be beneficial as well.

@MartinThoma MartinThoma added the is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF label Apr 7, 2022
@MartinThoma
Copy link
Member

Nothing was added and thus this is impossible for me to fix. I'll close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
Projects
None yet
Development

No branches or pull requests

3 participants