Browse Source

PDF.js version 1.5.437 - See mozilla/pdf.js@ca61ccc533ab9e0d693d32cec2c27ca9e7aabdd7

master v1.5.437
Pdf Bot 9 years ago
parent
commit
5aa7365c13
  1. 2
      bower.json
  2. 28
      build/pdf.combined.js
  3. 28
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json
  6. 20
      web/pdf_viewer.css
  7. 3
      web/pdf_viewer.js

2
bower.json

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

28
build/pdf.combined.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.5.434'; var pdfjsVersion = '1.5.437';
var pdfjsBuild = '8dbb5a7'; var pdfjsBuild = 'ca61ccc';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?
@ -24124,6 +24124,8 @@ var getDefaultSetting = displayDOMUtils.getDefaultSetting;
* @property {PageViewport} viewport * @property {PageViewport} viewport
* @property {IPDFLinkService} linkService * @property {IPDFLinkService} linkService
* @property {DownloadManager} downloadManager * @property {DownloadManager} downloadManager
* @property {string} imageResourcesPath
* @property {boolean} renderInteractiveForms
*/ */
/** /**
@ -24194,6 +24196,7 @@ var AnnotationElement = (function AnnotationElementClosure() {
this.linkService = parameters.linkService; this.linkService = parameters.linkService;
this.downloadManager = parameters.downloadManager; this.downloadManager = parameters.downloadManager;
this.imageResourcesPath = parameters.imageResourcesPath; this.imageResourcesPath = parameters.imageResourcesPath;
this.renderInteractiveForms = parameters.renderInteractiveForms;
if (isRenderable) { if (isRenderable) {
this.container = this._createContainer(); this.container = this._createContainer();
@ -24516,6 +24519,15 @@ var TextWidgetAnnotationElement = (
* @returns {HTMLSectionElement} * @returns {HTMLSectionElement}
*/ */
render: function TextWidgetAnnotationElement_render() { render: function TextWidgetAnnotationElement_render() {
this.container.className = 'textWidgetAnnotation';
if (this.renderInteractiveForms) {
var input = document.createElement('input');
input.type = 'text';
input.value = this.data.fieldValue;
this.container.appendChild(input);
} else {
var content = document.createElement('div'); var content = document.createElement('div');
content.textContent = this.data.fieldValue; content.textContent = this.data.fieldValue;
var textAlignment = this.data.textAlignment; var textAlignment = this.data.textAlignment;
@ -24528,6 +24540,7 @@ var TextWidgetAnnotationElement = (
this._setTextStyle(content, font); this._setTextStyle(content, font);
this.container.appendChild(content); this.container.appendChild(content);
}
return this.container; return this.container;
}, },
@ -24954,6 +24967,7 @@ var FileAttachmentAnnotationElement = (
* @property {PDFPage} page * @property {PDFPage} page
* @property {IPDFLinkService} linkService * @property {IPDFLinkService} linkService
* @property {string} imageResourcesPath * @property {string} imageResourcesPath
* @property {boolean} renderInteractiveForms
*/ */
/** /**
@ -24986,7 +25000,8 @@ var AnnotationLayer = (function AnnotationLayerClosure() {
linkService: parameters.linkService, linkService: parameters.linkService,
downloadManager: parameters.downloadManager, downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || imageResourcesPath: parameters.imageResourcesPath ||
getDefaultSetting('imageResourcesPath') getDefaultSetting('imageResourcesPath'),
renderInteractiveForms: parameters.renderInteractiveForms || false,
}; };
var element = annotationElementFactory.create(properties); var element = annotationElementFactory.create(properties);
if (element.isRenderable) { if (element.isRenderable) {
@ -42483,6 +42498,13 @@ exports.ColorSpace = ColorSpace;
PDFJS.isEvalSupported = (PDFJS.isEvalSupported === undefined ? PDFJS.isEvalSupported = (PDFJS.isEvalSupported === undefined ?
true : PDFJS.isEvalSupported); true : PDFJS.isEvalSupported);
/**
* Renders interactive form elements.
* @var {boolean}
*/
PDFJS.renderInteractiveForms = (PDFJS.renderInteractiveForms === undefined ?
false : PDFJS.renderInteractiveForms);
var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow; var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow;
delete PDFJS.openExternalLinksInNewWindow; delete PDFJS.openExternalLinksInNewWindow;
Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', { Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', {

28
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.5.434'; var pdfjsVersion = '1.5.437';
var pdfjsBuild = '8dbb5a7'; var pdfjsBuild = 'ca61ccc';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?
@ -4318,6 +4318,8 @@ var getDefaultSetting = displayDOMUtils.getDefaultSetting;
* @property {PageViewport} viewport * @property {PageViewport} viewport
* @property {IPDFLinkService} linkService * @property {IPDFLinkService} linkService
* @property {DownloadManager} downloadManager * @property {DownloadManager} downloadManager
* @property {string} imageResourcesPath
* @property {boolean} renderInteractiveForms
*/ */
/** /**
@ -4388,6 +4390,7 @@ var AnnotationElement = (function AnnotationElementClosure() {
this.linkService = parameters.linkService; this.linkService = parameters.linkService;
this.downloadManager = parameters.downloadManager; this.downloadManager = parameters.downloadManager;
this.imageResourcesPath = parameters.imageResourcesPath; this.imageResourcesPath = parameters.imageResourcesPath;
this.renderInteractiveForms = parameters.renderInteractiveForms;
if (isRenderable) { if (isRenderable) {
this.container = this._createContainer(); this.container = this._createContainer();
@ -4710,6 +4713,15 @@ var TextWidgetAnnotationElement = (
* @returns {HTMLSectionElement} * @returns {HTMLSectionElement}
*/ */
render: function TextWidgetAnnotationElement_render() { render: function TextWidgetAnnotationElement_render() {
this.container.className = 'textWidgetAnnotation';
if (this.renderInteractiveForms) {
var input = document.createElement('input');
input.type = 'text';
input.value = this.data.fieldValue;
this.container.appendChild(input);
} else {
var content = document.createElement('div'); var content = document.createElement('div');
content.textContent = this.data.fieldValue; content.textContent = this.data.fieldValue;
var textAlignment = this.data.textAlignment; var textAlignment = this.data.textAlignment;
@ -4722,6 +4734,7 @@ var TextWidgetAnnotationElement = (
this._setTextStyle(content, font); this._setTextStyle(content, font);
this.container.appendChild(content); this.container.appendChild(content);
}
return this.container; return this.container;
}, },
@ -5148,6 +5161,7 @@ var FileAttachmentAnnotationElement = (
* @property {PDFPage} page * @property {PDFPage} page
* @property {IPDFLinkService} linkService * @property {IPDFLinkService} linkService
* @property {string} imageResourcesPath * @property {string} imageResourcesPath
* @property {boolean} renderInteractiveForms
*/ */
/** /**
@ -5180,7 +5194,8 @@ var AnnotationLayer = (function AnnotationLayerClosure() {
linkService: parameters.linkService, linkService: parameters.linkService,
downloadManager: parameters.downloadManager, downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || imageResourcesPath: parameters.imageResourcesPath ||
getDefaultSetting('imageResourcesPath') getDefaultSetting('imageResourcesPath'),
renderInteractiveForms: parameters.renderInteractiveForms || false,
}; };
var element = annotationElementFactory.create(properties); var element = annotationElementFactory.create(properties);
if (element.isRenderable) { if (element.isRenderable) {
@ -11249,6 +11264,13 @@ exports._UnsupportedManager = _UnsupportedManager;
PDFJS.isEvalSupported = (PDFJS.isEvalSupported === undefined ? PDFJS.isEvalSupported = (PDFJS.isEvalSupported === undefined ?
true : PDFJS.isEvalSupported); true : PDFJS.isEvalSupported);
/**
* Renders interactive form elements.
* @var {boolean}
*/
PDFJS.renderInteractiveForms = (PDFJS.renderInteractiveForms === undefined ?
false : PDFJS.renderInteractiveForms);
var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow; var savedOpenExternalLinksInNewWindow = PDFJS.openExternalLinksInNewWindow;
delete PDFJS.openExternalLinksInNewWindow; delete PDFJS.openExternalLinksInNewWindow;
Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', { Object.defineProperty(PDFJS, 'openExternalLinksInNewWindow', {

4
build/pdf.worker.js vendored

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.5.434'; var pdfjsVersion = '1.5.437';
var pdfjsBuild = '8dbb5a7'; var pdfjsBuild = 'ca61ccc';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?

2
package.json

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

20
web/pdf_viewer.css

@ -110,6 +110,26 @@
cursor: pointer; cursor: pointer;
} }
.annotationLayer .textWidgetAnnotation input {
background-color: rgba(0, 54, 255, 0.13);
border: 1px solid transparent;
box-sizing: border-box;
font-size: 9px;
height: 100%;
padding: 0 3px;
vertical-align: top;
width: 100%;
}
.annotationLayer .textWidgetAnnotation input:hover {
border: 1px solid #000;
}
.annotationLayer .textWidgetAnnotation input:focus {
background: none;
border: 1px solid transparent;
}
.annotationLayer .popupWrapper { .annotationLayer .popupWrapper {
position: absolute; position: absolute;
width: 20em; width: 20em;

3
web/pdf_viewer.js

@ -3259,7 +3259,8 @@ var AnnotationLayerBuilder = (function AnnotationLayerBuilderClosure() {
annotations: annotations, annotations: annotations,
page: self.pdfPage, page: self.pdfPage,
linkService: self.linkService, linkService: self.linkService,
downloadManager: self.downloadManager downloadManager: self.downloadManager,
renderInteractiveForms: pdfjsLib.PDFJS.renderInteractiveForms,
}; };
if (self.div) { if (self.div) {

Loading…
Cancel
Save