Browse Source

PDF.js version 1.1.233

master v1.1.233
Pdf Bot 10 years ago
parent
commit
4c62b1e392
  1. 2
      bower.json
  2. 6
      build/pdf.combined.js
  3. 6
      build/pdf.js
  4. 6
      build/pdf.worker.js
  5. 2
      package.json
  6. 19
      web/pdf_viewer.js

2
bower.json

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

6
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.230'; PDFJS.version = '1.1.233';
PDFJS.build = '1da0b3a'; PDFJS.build = '0a744fb';
(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
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
} }
}); });
// Lazy test if the userAgant support CanvasTypedArrays // Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() { function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1; canvas.width = canvas.height = 1;

6
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.230'; PDFJS.version = '1.1.233';
PDFJS.build = '1da0b3a'; PDFJS.build = '0a744fb';
(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
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
} }
}); });
// Lazy test if the userAgant support CanvasTypedArrays // Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() { function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1; canvas.width = canvas.height = 1;

6
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.230'; PDFJS.version = '1.1.233';
PDFJS.build = '1da0b3a'; PDFJS.build = '0a744fb';
(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
@ -534,7 +534,7 @@ Object.defineProperty(PDFJS, 'isLittleEndian', {
} }
}); });
// Lazy test if the userAgant support CanvasTypedArrays // Lazy test if the userAgent support CanvasTypedArrays
function hasCanvasTypedArrays() { function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1; canvas.width = canvas.height = 1;

2
package.json

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

19
web/pdf_viewer.js

@ -17,7 +17,7 @@
/*jshint globalstrict: false */ /*jshint globalstrict: false */
/* globals PDFJS, PDFViewer, PDFPageView, TextLayerBuilder, PDFLinkService, /* globals PDFJS, PDFViewer, PDFPageView, TextLayerBuilder, PDFLinkService,
DefaultTextLayerFactory, AnnotationsLayerBuilder, PDFHistory, DefaultTextLayerFactory, AnnotationsLayerBuilder, PDFHistory,
DefaultAnnotationsLayerFactory, getFileName */ DefaultAnnotationsLayerFactory, getFileName, ProgressBar */
// Initializing PDFJS global object (if still undefined) // Initializing PDFJS global object (if still undefined)
if (typeof PDFJS === 'undefined') { if (typeof PDFJS === 'undefined') {
@ -29,7 +29,8 @@ if (typeof PDFJS === 'undefined') {
var CSS_UNITS = 96.0 / 72.0; var CSS_UNITS = 96.0 / 72.0;
var DEFAULT_SCALE = 'auto'; var DEFAULT_SCALE_VALUE = 'auto';
var DEFAULT_SCALE = 1.0;
var UNKNOWN_SCALE = 0; var UNKNOWN_SCALE = 0;
var MAX_AUTO_SCALE = 1.25; var MAX_AUTO_SCALE = 1.25;
var SCROLLBAR_PADDING = 40; var SCROLLBAR_PADDING = 40;
@ -2079,7 +2080,8 @@ var PDFViewer = (function pdfViewer() {
* @returns {number} * @returns {number}
*/ */
get currentScale() { get currentScale() {
return this._currentScale; return this._currentScale !== UNKNOWN_SCALE ? this._currentScale :
DEFAULT_SCALE;
}, },
/** /**
@ -2091,7 +2093,7 @@ var PDFViewer = (function pdfViewer() {
} }
if (!this.pdfDocument) { if (!this.pdfDocument) {
this._currentScale = val; this._currentScale = val;
this._currentScaleValue = val.toString(); this._currentScaleValue = val !== UNKNOWN_SCALE ? val.toString() : null;
return; return;
} }
this._setScale(val, false); this._setScale(val, false);
@ -2195,7 +2197,7 @@ var PDFViewer = (function pdfViewer() {
// Fetch a single page so we can get a viewport that will be the default // Fetch a single page so we can get a viewport that will be the default
// viewport for all pages // viewport for all pages
return firstPagePromise.then(function(pdfPage) { return firstPagePromise.then(function(pdfPage) {
var scale = this._currentScale || 1.0; var scale = this.currentScale;
var viewport = pdfPage.getViewport(scale * CSS_UNITS); var viewport = pdfPage.getViewport(scale * CSS_UNITS);
for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) {
var textLayerFactory = null; var textLayerFactory = null;
@ -2453,10 +2455,10 @@ var PDFViewer = (function pdfViewer() {
return; return;
} }
if (scale && scale !== this.currentScale) { if (scale && scale !== this._currentScale) {
this.currentScaleValue = scale; this.currentScaleValue = scale;
} else if (this.currentScale === UNKNOWN_SCALE) { } else if (this._currentScale === UNKNOWN_SCALE) {
this.currentScaleValue = DEFAULT_SCALE; this.currentScaleValue = DEFAULT_SCALE_VALUE;
} }
if (scale === 'page-fit' && !dest[4]) { if (scale === 'page-fit' && !dest[4]) {
@ -3104,5 +3106,6 @@ var PDFHistory = (function () {
PDFJS.PDFHistory = PDFHistory; PDFJS.PDFHistory = PDFHistory;
PDFJS.getFileName = getFileName; PDFJS.getFileName = getFileName;
PDFJS.ProgressBar = ProgressBar;
}).call((typeof window === 'undefined') ? this : window); }).call((typeof window === 'undefined') ? this : window);

Loading…
Cancel
Save