-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fixes unhandled XObject subtype PS error #4861
Conversation
self.buildPaintImageXObject(resources, xobj, false, | ||
operatorList, name, imageCache); | ||
args = []; | ||
continue; | ||
} else if (type.name === 'PS') { | ||
// PostScript XObjects are unused when viewing documents. | ||
// See section 4.7.1 of Adobe's PDF reference. |
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.
Just a suggestion: Perhaps we should add an info
message here saying that we ignore the XObject?
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.
Good suggestion. Consider it done.
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/37d2d349bb59167/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/37d2d349bb59167/output.txt Total script time: 0.73 mins Published
|
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/c98d98e3844c61d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/9f697b68f1a80a7/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/9f697b68f1a80a7/output.txt Total script time: 24.26 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/c98d98e3844c61d/output.txt Total script time: 26.94 mins
|
Fixes unhandled XObject subtype PS error
Thank you for the patch |
Fixes #4278.
From Adobe's PDF reference section 4.7.1:
"Beginning with PDF 1.1, a content stream can include PostScript language fragments. These fragments are used only when printing to a PostScript output device; they have no effect either when viewing the document on-screen or when printing it to a non-PostScript device. In addition, applications that understand PDF are unlikely to be able to interpret the PostScript fragments. Hence, this capability should be used with extreme caution and only if there is no other way to achieve the same result."
This tells us that we can safely ignore this XObject subtype.
Note that this PR also addresses the use of strict equalities in the changed portion of the code.