-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Name length error in Lexer_getName #6151
Comments
Adobe Reader/Acrobat does not complain about this PDF for me, so either they silently ignore the error (and the PDF is corrupted), or there is a bug in our parsing logic. We need to apply further triage here. |
👍 Thanks for the quick look @timvandermeij. Looking forward to seeing what we can come up with. |
Probably we need to change Line 842 in d105734
This change is motivated by the fact that it also says 'warning' in the message and I don't think it's a fatal error. I'm not sure why we say it's a warning and then use a Edit: Poppler seems to do something similar (https://github.com/danigm/poppler/blob/master/poppler/Lexer.cc#L434-L444), which is confusing me. |
According to the specification, names are limited to a length (in bytes) of I'm wondering if we're perhaps failing to parse the file correctly, based on the message above, hence I'm wondering if the actual issue is somewhere else in the parser.js. |
Good find, and you're right. I was confused because the error has 'warning' in the message. |
@Snuffleupagus
|
I'm loading up From ADV Part 1a from the SEC and encountering the following error when rendering Page 34:
Warning: name token is longer than allowed by the spec: 139
console.log
ing thename
buffer that is throwing the error yields:D,o,e,s, ,a,n,y, ,r,e,p,o,r,t, ,p,r,e,p,a,r,e,d, ,b,y, ,t,h,e, ,i,n,d,e,p,e,n,d,e,n,t, ,p,u,b,l,i,c, ,a,c,c,o,u,n,t,a,n,t, ,t,h,a,t, ,a,u,d,i,t,e,d, ,t,h,e, ,p,o,o,l,e,d, ,i,n,v,e,s,t,m,e,n,t, ,v,e,h,i,c,l,e, ,o,r, ,t,h,a,t, ,e,x,a,m,i,n,e,d, ,i,n,t,e,r,n,a,l, ,c,o,n,t,r,o,l,s
which I can see present on Page 34 of the pdf.
I'd like to solicit your opinion re: the severity of the error, if it's technically and issue with
PDFJS
or the PDF (Adobe Reader sluggishly can open this file and save it) and options for recovering from the error.PDFJS
Version: 1.0.1130The text was updated successfully, but these errors were encountered: