modesty / pdf2json

converts binary PDF to JSON and text, for server-side PDF processing and command-line use.

Home Page:https://github.com/modesty/pdf2json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannon't Read Property Num

varsis opened this issue · comments

'Warning: Unhandled rejection: TypeError: Cannot read property 'num' of undefined' at Obj.RefSetCache_has [as has] .....

The error occurs in base/core/objs.js, I replaced the line with a hack fix for the time being:

has: function RefSetCache_has(ref) { return ('R' + ref.num + '.' + ref.gen) in this.dict; }

after:

has: function RefSetCache_has(ref) { if(ref !== undefined) return ('R' + ref.num + '.' + ref.gen) in this.dict; else return null; }

Using this form:
http://www.albertahealthservices.ca/frm-18277.pdf

I did not half of the content after this "fix"

fixed in v1.0.9