[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Unsupported operand type(s) for +: 'PDFObjRef' and 'bytes' #258

Closed
adarsa opened this issue Oct 24, 2019 · 1 comment
Closed

Unsupported operand type(s) for +: 'PDFObjRef' and 'bytes' #258

adarsa opened this issue Oct 24, 2019 · 1 comment

Comments

@adarsa
Copy link
adarsa commented Oct 24, 2019

When using pdf2txt in PDFPageInterpreter getting the following error.

Traceback (most recent call last):
  File "/Users/adarsa/ilimi/pyenv36/bin/pdf2txt.py", line 115, in <module>
    if __name__ == '__main__': sys.exit(main(sys.argv))
  File "/Users/adarsa/ilimi/pyenv36/bin/pdf2txt.py", line 110, in main
    interpreter.process_page(page)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 841, in process_page
    self.render_contents(page.resources, page.contents, ctm=ctm)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 852, in render_contents
    self.init_resources(resources)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 356, in init_resources
    self.fontmap[fontid] = self.rsrcmgr.get_font(objid, spec)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 204, in get_font
    font = self.get_font(None, subspec)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 195, in get_font
    font = PDFCIDFont(self, spec)
  File "/Users/adarsa/ilimi/pyenv36/lib/python3.6/site-packages/pdfminer/pdffont.py", line 641, in __init__
    self.cidcoding = (self.cidsysteminfo.get('Registry', 'unknown') + b'-' +
TypeError: unsupported operand type(s) for +: 'PDFObjRef' and 'bytes'
@euske euske closed this as completed in cc7d409 Nov 3, 2019
@euske
Copy link
Owner
euske commented Nov 3, 2019

Hey, thanks for reporting! I attempted to fix the bug in the latest version. Can you try it?

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

No branches or pull requests

2 participants