Browse Source

PDF.js version 1.1.9

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

2
bower.json

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

4
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.7'; PDFJS.version = '1.1.9';
PDFJS.build = '43064e3'; PDFJS.build = 'c5eb34e';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.7'; PDFJS.version = '1.1.9';
PDFJS.build = '43064e3'; PDFJS.build = 'c5eb34e';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

4
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.1.7'; PDFJS.version = '1.1.9';
PDFJS.build = '43064e3'; PDFJS.build = 'c5eb34e';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

2
package.json

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

5
web/pdf_viewer.css

@ -79,6 +79,11 @@
background-color: white; background-color: white;
} }
.pdfViewer.removePageBorders .page {
margin: 0px auto 10px auto;
border: none;
}
.pdfViewer .page canvas { .pdfViewer .page canvas {
margin: 0; margin: 0;
display: block; display: block;

20
web/pdf_viewer.js

@ -1664,6 +1664,8 @@ DefaultAnnotationsLayerFactory.prototype = {
* @property {IPDFLinkService} linkService - The navigation/linking service. * @property {IPDFLinkService} linkService - The navigation/linking service.
* @property {PDFRenderingQueue} renderingQueue - (optional) The rendering * @property {PDFRenderingQueue} renderingQueue - (optional) The rendering
* queue object. * queue object.
* @property {boolean} removePageBorders - (optional) Removes the border shadow
* around the pages. The default is false.
*/ */
/** /**
@ -1700,6 +1702,7 @@ var PDFViewer = (function pdfViewer() {
this.container = options.container; this.container = options.container;
this.viewer = options.viewer || options.container.firstElementChild; this.viewer = options.viewer || options.container.firstElementChild;
this.linkService = options.linkService || new SimpleLinkService(this); this.linkService = options.linkService || new SimpleLinkService(this);
this.removePageBorders = options.removePageBorders || false;
this.defaultRenderingQueue = !options.renderingQueue; this.defaultRenderingQueue = !options.renderingQueue;
if (this.defaultRenderingQueue) { if (this.defaultRenderingQueue) {
@ -1714,6 +1717,10 @@ var PDFViewer = (function pdfViewer() {
this.updateInProgress = false; this.updateInProgress = false;
this.presentationModeState = PresentationModeState.UNKNOWN; this.presentationModeState = PresentationModeState.UNKNOWN;
this._resetView(); this._resetView();
if (this.removePageBorders) {
this.viewer.classList.add('removePageBorders');
}
} }
PDFViewer.prototype = /** @lends PDFViewer.prototype */{ PDFViewer.prototype = /** @lends PDFViewer.prototype */{
@ -2017,8 +2024,10 @@ var PDFViewer = (function pdfViewer() {
} }
var inPresentationMode = var inPresentationMode =
this.presentationModeState === PresentationModeState.FULLSCREEN; this.presentationModeState === PresentationModeState.FULLSCREEN;
var hPadding = inPresentationMode ? 0 : SCROLLBAR_PADDING; var hPadding = (inPresentationMode || this.removePageBorders) ?
var vPadding = inPresentationMode ? 0 : VERTICAL_PADDING; 0 : SCROLLBAR_PADDING;
var vPadding = (inPresentationMode || this.removePageBorders) ?
0 : VERTICAL_PADDING;
var pageWidthScale = (this.container.clientWidth - hPadding) / var pageWidthScale = (this.container.clientWidth - hPadding) /
currentPage.width * currentPage.scale; currentPage.width * currentPage.scale;
var pageHeightScale = (this.container.clientHeight - vPadding) / var pageHeightScale = (this.container.clientHeight - vPadding) /
@ -2121,9 +2130,12 @@ var PDFViewer = (function pdfViewer() {
width = dest[4] - x; width = dest[4] - x;
height = dest[5] - y; height = dest[5] - y;
var viewerContainer = this.container; var viewerContainer = this.container;
widthScale = (viewerContainer.clientWidth - SCROLLBAR_PADDING) / var hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING;
var vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING;
widthScale = (viewerContainer.clientWidth - hPadding) /
width / CSS_UNITS; width / CSS_UNITS;
heightScale = (viewerContainer.clientHeight - SCROLLBAR_PADDING) / heightScale = (viewerContainer.clientHeight - vPadding) /
height / CSS_UNITS; height / CSS_UNITS;
scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));
break; break;

Loading…
Cancel
Save