Browse Source

PDF.js version 1.0.431

master v1.0.431
Yury Delendik 10 years ago
parent
commit
bbd837e144
  1. 2
      bower.json
  2. 45
      build/pdf.combined.js
  3. 42
      build/pdf.js
  4. 7
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.0.429",
"version": "1.0.431",
"keywords": [
"Mozilla",
"pdf",

45
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.0.429';
PDFJS.build = '10db93b';
PDFJS.version = '1.0.431';
PDFJS.build = '6d5a041';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -3955,6 +3955,26 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -3955,6 +3955,26 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
var x = current.x, y = current.y;
for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {
switch (ops[i] | 0) {
case OPS.rectangle:
x = args[j++];
y = args[j++];
var width = args[j++];
var height = args[j++];
if (width === 0) {
width = this.getSinglePixelWidth();
}
if (height === 0) {
height = this.getSinglePixelWidth();
}
var xw = x + width;
var yh = y + height;
this.ctx.moveTo(x, y);
this.ctx.lineTo(xw, y);
this.ctx.lineTo(xw, yh);
this.ctx.lineTo(x, yh);
this.ctx.lineTo(x, y);
this.ctx.closePath();
break;
case OPS.moveTo:
x = args[j++];
y = args[j++];
@ -3995,16 +4015,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -3995,16 +4015,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
closePath: function CanvasGraphics_closePath() {
this.ctx.closePath();
},
rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
if (width === 0) {
width = this.getSinglePixelWidth();
}
if (height === 0) {
height = this.getSinglePixelWidth();
}
this.ctx.rect(x, y, width, height);
},
stroke: function CanvasGraphics_stroke(consumePath) {
consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
var ctx = this.ctx;
@ -4488,7 +4498,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4488,7 +4498,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
ury) {
// TODO According to the spec we're also suppose to ignore any operators
// that set color or include images while processing this type3 font.
this.rectangle(llx, lly, urx - llx, ury - lly);
this.ctx.rect(llx, lly, urx - llx, ury - lly);
this.clip();
this.endPath();
},
@ -4581,7 +4591,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4581,7 +4591,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
if (isArray(bbox) && 4 === bbox.length) {
var width = bbox[2] - bbox[0];
var height = bbox[3] - bbox[1];
this.rectangle(bbox[0], bbox[1], width, height);
this.ctx.rect(bbox[0], bbox[1], width, height);
this.clip();
this.endPath();
}
@ -4733,7 +4743,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4733,7 +4743,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
if (isArray(rect) && 4 === rect.length) {
var width = rect[2] - rect[0];
var height = rect[3] - rect[1];
this.rectangle(rect[0], rect[1], width, height);
this.ctx.rect(rect[0], rect[1], width, height);
this.clip();
this.endPath();
}
@ -5869,7 +5879,7 @@ var TilingPattern = (function TilingPatternClosure() { @@ -5869,7 +5879,7 @@ var TilingPattern = (function TilingPatternClosure() {
if (bbox && isArray(bbox) && 4 == bbox.length) {
var bboxWidth = x1 - x0;
var bboxHeight = y1 - y0;
graphics.rectangle(x0, y0, bboxWidth, bboxHeight);
graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
graphics.clip();
graphics.endPath();
}
@ -22251,6 +22261,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -22251,6 +22261,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
case OPS.closePath:
self.buildPath(operatorList, fn, args);
continue;
case OPS.rectangle:
self.buildPath(operatorList, fn, args);
continue;
}
operatorList.addOp(fn, args);
}

42
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.0.429';
PDFJS.build = '10db93b';
PDFJS.version = '1.0.431';
PDFJS.build = '6d5a041';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -3999,6 +3999,26 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -3999,6 +3999,26 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
var x = current.x, y = current.y;
for (var i = 0, j = 0, ii = ops.length; i < ii; i++) {
switch (ops[i] | 0) {
case OPS.rectangle:
x = args[j++];
y = args[j++];
var width = args[j++];
var height = args[j++];
if (width === 0) {
width = this.getSinglePixelWidth();
}
if (height === 0) {
height = this.getSinglePixelWidth();
}
var xw = x + width;
var yh = y + height;
this.ctx.moveTo(x, y);
this.ctx.lineTo(xw, y);
this.ctx.lineTo(xw, yh);
this.ctx.lineTo(x, yh);
this.ctx.lineTo(x, y);
this.ctx.closePath();
break;
case OPS.moveTo:
x = args[j++];
y = args[j++];
@ -4039,16 +4059,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4039,16 +4059,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
closePath: function CanvasGraphics_closePath() {
this.ctx.closePath();
},
rectangle: function CanvasGraphics_rectangle(x, y, width, height) {
if (width === 0) {
width = this.getSinglePixelWidth();
}
if (height === 0) {
height = this.getSinglePixelWidth();
}
this.ctx.rect(x, y, width, height);
},
stroke: function CanvasGraphics_stroke(consumePath) {
consumePath = typeof consumePath !== 'undefined' ? consumePath : true;
var ctx = this.ctx;
@ -4532,7 +4542,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4532,7 +4542,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
ury) {
// TODO According to the spec we're also suppose to ignore any operators
// that set color or include images while processing this type3 font.
this.rectangle(llx, lly, urx - llx, ury - lly);
this.ctx.rect(llx, lly, urx - llx, ury - lly);
this.clip();
this.endPath();
},
@ -4625,7 +4635,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4625,7 +4635,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
if (isArray(bbox) && 4 === bbox.length) {
var width = bbox[2] - bbox[0];
var height = bbox[3] - bbox[1];
this.rectangle(bbox[0], bbox[1], width, height);
this.ctx.rect(bbox[0], bbox[1], width, height);
this.clip();
this.endPath();
}
@ -4777,7 +4787,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -4777,7 +4787,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
if (isArray(rect) && 4 === rect.length) {
var width = rect[2] - rect[0];
var height = rect[3] - rect[1];
this.rectangle(rect[0], rect[1], width, height);
this.ctx.rect(rect[0], rect[1], width, height);
this.clip();
this.endPath();
}
@ -5913,7 +5923,7 @@ var TilingPattern = (function TilingPatternClosure() { @@ -5913,7 +5923,7 @@ var TilingPattern = (function TilingPatternClosure() {
if (bbox && isArray(bbox) && 4 == bbox.length) {
var bboxWidth = x1 - x0;
var bboxHeight = y1 - y0;
graphics.rectangle(x0, y0, bboxWidth, bboxHeight);
graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
graphics.clip();
graphics.endPath();
}

7
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.0.429';
PDFJS.build = '10db93b';
PDFJS.version = '1.0.431';
PDFJS.build = '6d5a041';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -17415,6 +17415,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -17415,6 +17415,9 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
case OPS.closePath:
self.buildPath(operatorList, fn, args);
continue;
case OPS.rectangle:
self.buildPath(operatorList, fn, args);
continue;
}
operatorList.addOp(fn, args);
}

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.0.429",
"version": "1.0.431",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [
"Mozilla",

Loading…
Cancel
Save