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

KeyError: Name</ColorSpace> #9

Open
eeezae opened this issue May 17, 2021 · 3 comments
Open

KeyError: Name</ColorSpace> #9

eeezae opened this issue May 17, 2021 · 3 comments

Comments

@eeezae
Copy link

eeezae commented May 17, 2021

image

      llpdf.PDFReader [W]: PDF seems to violate standard, bytes read in second line are bytearray(b'1 0 obj').
 llpdf.filters.DownscaleImageOptimization [W]: Ignoring unsupported image XRef<25, 0>: Cannot generate PDFImage object with non-trivial value decode array: [0, 1, 0, 1, 0, 1, 0, 1]
 llpdf.filters.DownscaleImageOptimization [W]: Ignoring unsupported image XRef<26, 0>: Cannot generate PDFImage object with non-trivial value decode array: [0, 1, 0, 1, 0, 1, 0, 1]
 llpdf.filters.DownscaleImageOptimization [W]: Ignoring unsupported image XRef<27, 0>: Cannot generate PDFImage object with non-trivial value decode array: [0, 1, 0, 1, 0, 1, 0, 1]
Traceback (most recent call last):
  File "/Users/mc/opt/anaconda3/bin/pdfminify", line 5, in <module>
    from pdfminify.__main__ import main
  File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/pdfminify/__main__.py", line 148, in <module>
    pdf_filter.run()
  File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/llpdf/filters/DownscaleImageOptimization.py", line 79, in run
    image = self._pdf.get_image(img_xref)
  File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/llpdf/PDFDocument.py", line 266, in get_image
    image = PDFImage.create_from_object(image, alpha_channel)
  File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/llpdf/img/PDFImage.py", line 87, in create_from_object
    image = cls.create_raw_from_object(xobj)
  File "/Users/mc/opt/anaconda3/lib/python3.8/site-packages/llpdf/img/PDFImage.py", line 61, in create_raw_from_object
    colorspace_info = xobj.content[PDFName("/ColorSpace")]
KeyError: Name</ColorSpace>
@johndoe31415
Copy link
Owner

Hey there, thanks for the bug report. Any chance you can share the PDF so I can take a look?

@eeezae
Copy link
Author

eeezae commented May 17, 2021

@johndoe31415
Copy link
Owner

Thanks a bunch! I can reproduce your error. Will look into this issue after my work day. Take care!

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