From 4c57cb54af11b512b2ba8495485f4387174b24c3 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:33:41 -0500 Subject: [PATCH] PDF.js version 1.0.694 --- bower.json | 2 +- build/pdf.combined.js | 40 ++++++++++++++++++++++++++++++++++++++-- build/pdf.js | 40 ++++++++++++++++++++++++++++++++++++++-- build/pdf.worker.js | 4 ++-- package.json | 2 +- 5 files changed, 80 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index c5bfe0e7e..24dc3af00 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.692", + "version": "1.0.694", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 34e6583bd..a57fcb9cf 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.692'; -PDFJS.build = '34449f6'; +PDFJS.version = '1.0.694'; +PDFJS.build = '90d79d1'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -7013,6 +7013,12 @@ var SVGGraphics = (function SVGGraphicsClosure() { case OPS.paintImageMaskXObject: this.paintImageMaskXObject(args[0]); break; + case OPS.paintFormXObjectBegin: + this.paintFormXObjectBegin(args[0], args[1]); + break; + case OPS.paintFormXObjectEnd: + this.paintFormXObjectEnd(); + break; case OPS.closePath: this.closePath(); break; @@ -7224,6 +7230,7 @@ var SVGGraphics = (function SVGGraphicsClosure() { endText: function SVGGraphics_endText() { if (this.current.pendingClip) { + this.cgrp.appendChild(this.tgrp); this.pgrp.appendChild(this.cgrp); } else { this.pgrp.appendChild(this.tgrp); @@ -7578,6 +7585,35 @@ var SVGGraphics = (function SVGGraphicsClosure() { this.paintInlineImageXObject(imgData, mask); }, + + paintFormXObjectBegin: + function SVGGraphics_paintFormXObjectBegin(matrix, bbox) { + this.save(); + + if (isArray(matrix) && matrix.length === 6) { + this.transform(matrix[0], matrix[1], matrix[2], + matrix[3], matrix[4], matrix[5]); + } + + if (isArray(bbox) && bbox.length === 4) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + + var cliprect = document.createElementNS(NS, 'svg:rect'); + cliprect.setAttributeNS(null, 'x', bbox[0]); + cliprect.setAttributeNS(null, 'y', bbox[1]); + cliprect.setAttributeNS(null, 'width', pf(width)); + cliprect.setAttributeNS(null, 'height', pf(height)); + this.current.element = cliprect; + this.clip('nonzero'); + this.endPath(); + } + }, + + paintFormXObjectEnd: + function SVGGraphics_paintFormXObjectEnd() { + this.restore(); + } }; return SVGGraphics; })(); diff --git a/build/pdf.js b/build/pdf.js index ef9a5baca..197faf8ec 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.692'; -PDFJS.build = '34449f6'; +PDFJS.version = '1.0.694'; +PDFJS.build = '90d79d1'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -7057,6 +7057,12 @@ var SVGGraphics = (function SVGGraphicsClosure() { case OPS.paintImageMaskXObject: this.paintImageMaskXObject(args[0]); break; + case OPS.paintFormXObjectBegin: + this.paintFormXObjectBegin(args[0], args[1]); + break; + case OPS.paintFormXObjectEnd: + this.paintFormXObjectEnd(); + break; case OPS.closePath: this.closePath(); break; @@ -7268,6 +7274,7 @@ var SVGGraphics = (function SVGGraphicsClosure() { endText: function SVGGraphics_endText() { if (this.current.pendingClip) { + this.cgrp.appendChild(this.tgrp); this.pgrp.appendChild(this.cgrp); } else { this.pgrp.appendChild(this.tgrp); @@ -7622,6 +7629,35 @@ var SVGGraphics = (function SVGGraphicsClosure() { this.paintInlineImageXObject(imgData, mask); }, + + paintFormXObjectBegin: + function SVGGraphics_paintFormXObjectBegin(matrix, bbox) { + this.save(); + + if (isArray(matrix) && matrix.length === 6) { + this.transform(matrix[0], matrix[1], matrix[2], + matrix[3], matrix[4], matrix[5]); + } + + if (isArray(bbox) && bbox.length === 4) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + + var cliprect = document.createElementNS(NS, 'svg:rect'); + cliprect.setAttributeNS(null, 'x', bbox[0]); + cliprect.setAttributeNS(null, 'y', bbox[1]); + cliprect.setAttributeNS(null, 'width', pf(width)); + cliprect.setAttributeNS(null, 'height', pf(height)); + this.current.element = cliprect; + this.clip('nonzero'); + this.endPath(); + } + }, + + paintFormXObjectEnd: + function SVGGraphics_paintFormXObjectEnd() { + this.restore(); + } }; return SVGGraphics; })(); diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 2dca829b1..89ba31cd8 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.692'; -PDFJS.build = '34449f6'; +PDFJS.version = '1.0.694'; +PDFJS.build = '90d79d1'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/package.json b/package.json index cc12ff62d..4c2751f67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.692", + "version": "1.0.694", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",