Skip to content

A certain PDF File triggers OSError: [Errno 22] Invalid argument #530

@vershimajr

Description

@vershimajr

Hello,

This file is giving me trouble when attempting to simply create a PdfFileReader object

Code:

with open('./media/NTB - LOI.pdf', 'rb') as input:
  PyPDF2.PdfFileReader(input)

Error:

Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "/home/vershimaajo/gigarbox_academia/venv/lib/python3.6/site-packages/PyPDF2/pdf.py", line 1084, in __init__
    self.read(stream)
  File "/home/vershimaajo/gigarbox_academia/venv/lib/python3.6/site-packages/PyPDF2/pdf.py", line 1883, in read
    stream.seek(-11, 1)
OSError: [Errno 22] Invalid argument

Thanks for assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsPdfReaderThe PdfReader component is affectedis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions