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

TypeError: invalid length: 8 when scanning PDF from fop project #192

Open
sschuberth opened this issue Aug 28, 2017 · 2 comments
Open

TypeError: invalid length: 8 when scanning PDF from fop project #192

sschuberth opened this issue Aug 28, 2017 · 2 comments

Comments

@sschuberth
Copy link

Originally reported as nexB/scancode-toolkit#740.

pdfminer-2014032 throws a TypeError: invalid length: 8 when scanning this PDF from fop the project:

File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdfdocument.py", line 328, in __init__
  self.info.append(dict_value(trailer['Info']))
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdftypes.py", line 155, in dict_value
  x = resolve1(x)
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdftypes.py", line 75, in resolve1
  x = x.resolve(default=default)
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdftypes.py", line 62, in resolve
  return self.doc.getobj(self.objid)
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdfdocument.py", line 462, in getobj
  (strmid, index, genno) = xref.get_pos(objid)
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/pdfdocument.py", line 261, in get_pos
  f2 = nunpack(ent[self.fl1:self.fl1+self.fl2])
File "/workspace/tools/scancode/local/lib/python2.7/site-packages/pdfminer/utils.py", line 175, in nunpack
  raise TypeError('invalid length: %d' % l)
@pombredanne
Copy link

FWIW, I switched ScanCode to pdfminer.six maintained by @goulu and things work much much better for this and other unrelated bugs. See nexB/scancode-toolkit#740

@pombredanne
Copy link

@euske Just a thought, if you do not have the time to maintain pdfminer anymore, @goulu would likely be a superb maintainer to pass the baton to, based on the code at least ;)

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