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

PDFSyntaxError('No /Root object! - Is this really a PDF?') #10

Open
ghost opened this issue Nov 15, 2017 · 5 comments
Open

PDFSyntaxError('No /Root object! - Is this really a PDF?') #10

ghost opened this issue Nov 15, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 15, 2017

code like this:
import slate with open('xxx.pdf') as f: doc = slate.PDF(f)
raise problem:
Traceback (most recent call last):
File "", line 2, in
File "C:\Python27\lib\site-packages\slate\slate.py", line 38, in init
self.doc.set_parser(self.parser)
File "C:\Python27\lib\site-packages\pdfminer\pdfparser.py", line 333, in set_parser
raise PDFSyntaxError('No /Root object! - Is this really a PDF?')
pdfminer.pdfparser.PDFSyntaxError: No /Root object! - Is this really a PDF?

@kjam
Copy link
Collaborator

kjam commented Dec 5, 2017

Hi @Canacedq can you share what PDF you are using? Is it one included in the repository?

@conango
Copy link

conango commented Jan 2, 2018

Hi,I'm also encountered with this issue and using the exactly same PDF file downloaded from this github.
pdfminer is 20110515 ver.
and it can't run with the latest version of pdfminer.
Please have a look at this issue,thanks!

@kjam
Copy link
Collaborator

kjam commented Jan 6, 2018

Hi @conango,

I'm worried this might be a Windows encoding error, as it works fine on my Linux laptop. Can you try opening the file in binary mode?

with open('xxx.pdf', 'rb') as f:

Let me know if that works, thanks!

-katharine

@conango
Copy link

conango commented Jan 8, 2018

Hi @kjam ,
This is the result screenshot.
Hope it can help.
qq 20180108092153
Thanks

@kjam
Copy link
Collaborator

kjam commented Jan 8, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants