Browse Source

PDF.js version 1.5.485 - See mozilla/pdf.js@7820f58c490b0c6f09384ab5f369955bb71286d0

master v1.5.485
Pdf Bot 8 years ago
parent
commit
2dfdd37d49
  1. 2
      bower.json
  2. 42
      build/pdf.combined.js
  3. 10
      build/pdf.js
  4. 36
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.5.481",
"version": "1.5.485",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

42
build/pdf.combined.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.481';
var pdfjsBuild = '431af8c';
var pdfjsVersion = '1.5.485';
var pdfjsBuild = '7820f58';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -24572,14 +24572,18 @@ var TextWidgetAnnotationElement = ( @@ -24572,14 +24572,18 @@ var TextWidgetAnnotationElement = (
var element = null;
if (this.renderInteractiveForms) {
// NOTE: We cannot set the values using `element.value` below, since it
// prevents the AnnotationLayer rasterizer in `test/driver.js`
// from parsing the elements correctly for the reference tests.
if (this.data.multiLine) {
element = document.createElement('textarea');
element.textContent = this.data.fieldValue;
} else {
element = document.createElement('input');
element.type = 'text';
element.setAttribute('value', this.data.fieldValue);
}
element.value = this.data.fieldValue;
element.disabled = this.data.readOnly;
if (this.data.maxLen !== null) {
@ -49139,12 +49143,10 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ { @@ -49139,12 +49143,10 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
* @param {Object} ref
* @param {string} uniquePrefix
* @param {Object} idCounters
* @param {boolean} renderInteractiveForms
* @returns {Annotation}
*/
create: function AnnotationFactory_create(xref, ref,
uniquePrefix, idCounters,
renderInteractiveForms) {
uniquePrefix, idCounters) {
var dict = xref.fetchIfRef(ref);
if (!isDict(dict)) {
return;
@ -49163,7 +49165,6 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ { @@ -49163,7 +49165,6 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
ref: isRef(ref) ? ref : null,
subtype: subtype,
id: id,
renderInteractiveForms: renderInteractiveForms,
};
switch (subtype) {
@ -49488,7 +49489,8 @@ var Annotation = (function AnnotationClosure() { @@ -49488,7 +49489,8 @@ var Annotation = (function AnnotationClosure() {
}.bind(this));
},
getOperatorList: function Annotation_getOperatorList(evaluator, task) {
getOperatorList: function Annotation_getOperatorList(evaluator, task,
renderForms) {
if (!this.appearance) {
return Promise.resolve(new OperatorList());
}
@ -49525,13 +49527,13 @@ var Annotation = (function AnnotationClosure() { @@ -49525,13 +49527,13 @@ var Annotation = (function AnnotationClosure() {
};
Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
annotations, opList, partialEvaluator, task, intent) {
annotations, opList, partialEvaluator, task, intent, renderForms) {
var annotationPromises = [];
for (var i = 0, n = annotations.length; i < n; ++i) {
if ((intent === 'display' && annotations[i].viewable) ||
(intent === 'print' && annotations[i].printable)) {
annotationPromises.push(
annotations[i].getOperatorList(partialEvaluator, task));
annotations[i].getOperatorList(partialEvaluator, task, renderForms));
}
}
return Promise.all(annotationPromises).then(function(operatorLists) {
@ -49767,8 +49769,6 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() { @@ -49767,8 +49769,6 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
function TextWidgetAnnotation(params) {
WidgetAnnotation.call(this, params);
this.renderInteractiveForms = params.renderInteractiveForms;
// Determine the alignment of text in the field.
var alignment = Util.getInheritableProperty(params.dict, 'Q');
if (!isInt(alignment) || alignment < 0 || alignment > 2) {
@ -49789,18 +49789,20 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() { @@ -49789,18 +49789,20 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
}
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator,
task) {
getOperatorList:
function TextWidgetAnnotation_getOperatorList(evaluator, task,
renderForms) {
var operatorList = new OperatorList();
// Do not render form elements on the canvas when interactive forms are
// enabled. The display layer is responsible for rendering them instead.
if (this.renderInteractiveForms) {
if (renderForms) {
return Promise.resolve(operatorList);
}
if (this.appearance) {
return Annotation.prototype.getOperatorList.call(this, evaluator, task);
return Annotation.prototype.getOperatorList.call(this, evaluator, task,
renderForms);
}
// Even if there is an appearance stream, ignore it. This is the
@ -50301,8 +50303,6 @@ var Page = (function PageClosure() { @@ -50301,8 +50303,6 @@ var Page = (function PageClosure() {
});
});
this.renderInteractiveForms = renderInteractiveForms;
var annotationsPromise = pdfManager.ensure(this, 'annotations');
return Promise.all([pageListPromise, annotationsPromise]).then(
function(datas) {
@ -50315,7 +50315,8 @@ var Page = (function PageClosure() { @@ -50315,7 +50315,8 @@ var Page = (function PageClosure() {
}
var annotationsReadyPromise = Annotation.appendToOperatorList(
annotations, pageOpList, partialEvaluator, task, intent);
annotations, pageOpList, partialEvaluator, task, intent,
renderInteractiveForms);
return annotationsReadyPromise.then(function () {
pageOpList.flush(true);
return pageOpList;
@ -50386,8 +50387,7 @@ var Page = (function PageClosure() { @@ -50386,8 +50387,7 @@ var Page = (function PageClosure() {
var annotationRef = annotationRefs[i];
var annotation = annotationFactory.create(this.xref, annotationRef,
this.uniquePrefix,
this.idCounters,
this.renderInteractiveForms);
this.idCounters);
if (annotation) {
annotations.push(annotation);
}

10
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.481';
var pdfjsBuild = '431af8c';
var pdfjsVersion = '1.5.485';
var pdfjsBuild = '7820f58';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -4767,14 +4767,18 @@ var TextWidgetAnnotationElement = ( @@ -4767,14 +4767,18 @@ var TextWidgetAnnotationElement = (
var element = null;
if (this.renderInteractiveForms) {
// NOTE: We cannot set the values using `element.value` below, since it
// prevents the AnnotationLayer rasterizer in `test/driver.js`
// from parsing the elements correctly for the reference tests.
if (this.data.multiLine) {
element = document.createElement('textarea');
element.textContent = this.data.fieldValue;
} else {
element = document.createElement('input');
element.type = 'text';
element.setAttribute('value', this.data.fieldValue);
}
element.value = this.data.fieldValue;
element.disabled = this.data.readOnly;
if (this.data.maxLen !== null) {

36
build/pdf.worker.js vendored

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.481';
var pdfjsBuild = '431af8c';
var pdfjsVersion = '1.5.485';
var pdfjsBuild = '7820f58';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -40269,12 +40269,10 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ { @@ -40269,12 +40269,10 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
* @param {Object} ref
* @param {string} uniquePrefix
* @param {Object} idCounters
* @param {boolean} renderInteractiveForms
* @returns {Annotation}
*/
create: function AnnotationFactory_create(xref, ref,
uniquePrefix, idCounters,
renderInteractiveForms) {
uniquePrefix, idCounters) {
var dict = xref.fetchIfRef(ref);
if (!isDict(dict)) {
return;
@ -40293,7 +40291,6 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ { @@ -40293,7 +40291,6 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
ref: isRef(ref) ? ref : null,
subtype: subtype,
id: id,
renderInteractiveForms: renderInteractiveForms,
};
switch (subtype) {
@ -40618,7 +40615,8 @@ var Annotation = (function AnnotationClosure() { @@ -40618,7 +40615,8 @@ var Annotation = (function AnnotationClosure() {
}.bind(this));
},
getOperatorList: function Annotation_getOperatorList(evaluator, task) {
getOperatorList: function Annotation_getOperatorList(evaluator, task,
renderForms) {
if (!this.appearance) {
return Promise.resolve(new OperatorList());
}
@ -40655,13 +40653,13 @@ var Annotation = (function AnnotationClosure() { @@ -40655,13 +40653,13 @@ var Annotation = (function AnnotationClosure() {
};
Annotation.appendToOperatorList = function Annotation_appendToOperatorList(
annotations, opList, partialEvaluator, task, intent) {
annotations, opList, partialEvaluator, task, intent, renderForms) {
var annotationPromises = [];
for (var i = 0, n = annotations.length; i < n; ++i) {
if ((intent === 'display' && annotations[i].viewable) ||
(intent === 'print' && annotations[i].printable)) {
annotationPromises.push(
annotations[i].getOperatorList(partialEvaluator, task));
annotations[i].getOperatorList(partialEvaluator, task, renderForms));
}
}
return Promise.all(annotationPromises).then(function(operatorLists) {
@ -40897,8 +40895,6 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() { @@ -40897,8 +40895,6 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
function TextWidgetAnnotation(params) {
WidgetAnnotation.call(this, params);
this.renderInteractiveForms = params.renderInteractiveForms;
// Determine the alignment of text in the field.
var alignment = Util.getInheritableProperty(params.dict, 'Q');
if (!isInt(alignment) || alignment < 0 || alignment > 2) {
@ -40919,18 +40915,20 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() { @@ -40919,18 +40915,20 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
}
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator,
task) {
getOperatorList:
function TextWidgetAnnotation_getOperatorList(evaluator, task,
renderForms) {
var operatorList = new OperatorList();
// Do not render form elements on the canvas when interactive forms are
// enabled. The display layer is responsible for rendering them instead.
if (this.renderInteractiveForms) {
if (renderForms) {
return Promise.resolve(operatorList);
}
if (this.appearance) {
return Annotation.prototype.getOperatorList.call(this, evaluator, task);
return Annotation.prototype.getOperatorList.call(this, evaluator, task,
renderForms);
}
// Even if there is an appearance stream, ignore it. This is the
@ -41431,8 +41429,6 @@ var Page = (function PageClosure() { @@ -41431,8 +41429,6 @@ var Page = (function PageClosure() {
});
});
this.renderInteractiveForms = renderInteractiveForms;
var annotationsPromise = pdfManager.ensure(this, 'annotations');
return Promise.all([pageListPromise, annotationsPromise]).then(
function(datas) {
@ -41445,7 +41441,8 @@ var Page = (function PageClosure() { @@ -41445,7 +41441,8 @@ var Page = (function PageClosure() {
}
var annotationsReadyPromise = Annotation.appendToOperatorList(
annotations, pageOpList, partialEvaluator, task, intent);
annotations, pageOpList, partialEvaluator, task, intent,
renderInteractiveForms);
return annotationsReadyPromise.then(function () {
pageOpList.flush(true);
return pageOpList;
@ -41516,8 +41513,7 @@ var Page = (function PageClosure() { @@ -41516,8 +41513,7 @@ var Page = (function PageClosure() {
var annotationRef = annotationRefs[i];
var annotation = annotationFactory.create(this.xref, annotationRef,
this.uniquePrefix,
this.idCounters,
this.renderInteractiveForms);
this.idCounters);
if (annotation) {
annotations.push(annotation);
}

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.5.481",
"version": "1.5.485",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

Loading…
Cancel
Save