[Pkg-javascript-commits] [pdf.js] 201/210: Fixes unhandled XObject subtype PS error

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:21:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository pdf.js.

commit e128bdc3970afed0104f3706be8f3d4538a6a863
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Wed May 28 23:20:08 2014 +0200

    Fixes unhandled XObject subtype PS error
---
 src/core/evaluator.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/core/evaluator.js b/src/core/evaluator.js
index 90d26b2..ccb5e76 100644
--- a/src/core/evaluator.js
+++ b/src/core/evaluator.js
@@ -635,7 +635,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
                 assert(isName(type),
                   'XObject should have a Name subtype');
 
-                if ('Form' == type.name) {
+                if (type.name === 'Form') {
                   stateManager.save();
                   return self.buildFormXObject(resources, xobj, null,
                                                operatorList,
@@ -644,11 +644,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
                       stateManager.restore();
                       next(resolve, reject);
                     }, reject);
-                } else if ('Image' == type.name) {
+                } else if (type.name === 'Image') {
                   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.
+                  info('Ignored XObject subtype PS');
+                  continue;
                 } else {
                   error('Unhandled XObject subtype ' + type.name);
                 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list