-
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
Makes PDF files load when xrefEntry is undefined #4606
Conversation
@@ -1100,7 +1100,8 @@ var XRef = (function XRefClosure() { | |||
|
|||
getEntry: function XRef_getEntry(i) { | |||
var xrefEntry = this.entries[i]; | |||
if (xrefEntry !== null && !xrefEntry.free && xrefEntry.offset) { | |||
if (xrefEntry !== undefined && xrefEntry !== null && !xrefEntry.free && | |||
xrefEntry.offset) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just if (xrefEntry && !xrefEntry.free && xrefEntry.offset) {
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I have updated the commit.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/2c1680e376f6696/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/a428071a3f9ee00/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/2c1680e376f6696/output.txt Total script time: 21.62 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/a428071a3f9ee00/output.txt Total script time: 25.68 mins
|
Makes PDF files load when xrefEntry is undefined
You are welcome :) It's great to see that this was useful and even better that some problems are already fixed. We will run the tests again after easter and publish an updated report. |
Fixes http://www.prensalibre.com/multimedia/Terremoto-1976-Sismo-terremoto_del_76-guatemala-Teremoto-temblorgt_PREFIL20140203_0001.pdf from http://bthorben.github.io/pdfRepo.
Thanks to @bthorben and the Opera team for listing problematic PDFs at http://bthorben.github.io/pdfRepo!