From eeb69c3472560bd7bee8ca58e041fdc274dc7ea6 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Tue, 22 Nov 2016 20:24:21 +0000 Subject: [PATCH] PDF.js version 1.6.338 - See mozilla/pdf.js@9ff19985c0a43e186fe2fae7f1d87bb310c89780 --- bower.json | 2 +- build/pdf.combined.js | 21 ++++++++++++++++++--- build/pdf.js | 7 +++++-- build/pdf.worker.js | 18 +++++++++++++++--- package.json | 2 +- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index 8a635d201..0c1d77987 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.6.336", + "version": "1.6.338", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 243361c53..d090400ff 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.336'; - var pdfjsBuild = '9d8fb02'; + var pdfjsVersion = '1.6.338'; + var pdfjsBuild = '9ff1998'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { @@ -46677,6 +46677,9 @@ get ref() { return this.pageInfo.ref; }, + get userUnit() { + return this.pageInfo.userUnit; + }, get view() { return this.pageInfo.view; }, @@ -55081,6 +55084,7 @@ var info = sharedUtil.info; var isArray = sharedUtil.isArray; var isArrayBuffer = sharedUtil.isArrayBuffer; + var isNum = sharedUtil.isNum; var isString = sharedUtil.isString; var shadow = sharedUtil.shadow; var stringToBytes = sharedUtil.stringToBytes; @@ -55104,6 +55108,7 @@ var Annotation = coreAnnotation.Annotation; var AnnotationFactory = coreAnnotation.AnnotationFactory; var Page = function PageClosure() { + var DEFAULT_USER_UNIT = 1.0; var LETTER_SIZE_MEDIABOX = [ 0, 0, @@ -55164,6 +55169,13 @@ } return shadow(this, 'mediaBox', obj); }, + get userUnit() { + var obj = this.getPageProp('UserUnit'); + if (!isNum(obj) || obj <= 0) { + obj = DEFAULT_USER_UNIT; + } + return shadow(this, 'userUnit', obj); + }, get view() { var mediaBox = this.mediaBox; var cropBox = this.getInheritedPageProp('CropBox'); @@ -56247,16 +56259,19 @@ return pdfManager.getPage(data.pageIndex).then(function (page) { var rotatePromise = pdfManager.ensure(page, 'rotate'); var refPromise = pdfManager.ensure(page, 'ref'); + var userUnitPromise = pdfManager.ensure(page, 'userUnit'); var viewPromise = pdfManager.ensure(page, 'view'); return Promise.all([ rotatePromise, refPromise, + userUnitPromise, viewPromise ]).then(function (results) { return { rotate: results[0], ref: results[1], - view: results[2] + userUnit: results[2], + view: results[3] }; }); }); diff --git a/build/pdf.js b/build/pdf.js index f4c3c603f..ca88aad5e 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.336'; - var pdfjsBuild = '9d8fb02'; + var pdfjsVersion = '1.6.338'; + var pdfjsBuild = '9ff1998'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { @@ -7859,6 +7859,9 @@ get ref() { return this.pageInfo.ref; }, + get userUnit() { + return this.pageInfo.userUnit; + }, get view() { return this.pageInfo.view; }, diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 623d48eac..010322b07 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.336'; - var pdfjsBuild = '9d8fb02'; + var pdfjsVersion = '1.6.338'; + var pdfjsBuild = '9ff1998'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { @@ -48467,6 +48467,7 @@ var info = sharedUtil.info; var isArray = sharedUtil.isArray; var isArrayBuffer = sharedUtil.isArrayBuffer; + var isNum = sharedUtil.isNum; var isString = sharedUtil.isString; var shadow = sharedUtil.shadow; var stringToBytes = sharedUtil.stringToBytes; @@ -48490,6 +48491,7 @@ var Annotation = coreAnnotation.Annotation; var AnnotationFactory = coreAnnotation.AnnotationFactory; var Page = function PageClosure() { + var DEFAULT_USER_UNIT = 1.0; var LETTER_SIZE_MEDIABOX = [ 0, 0, @@ -48550,6 +48552,13 @@ } return shadow(this, 'mediaBox', obj); }, + get userUnit() { + var obj = this.getPageProp('UserUnit'); + if (!isNum(obj) || obj <= 0) { + obj = DEFAULT_USER_UNIT; + } + return shadow(this, 'userUnit', obj); + }, get view() { var mediaBox = this.mediaBox; var cropBox = this.getInheritedPageProp('CropBox'); @@ -49633,16 +49642,19 @@ return pdfManager.getPage(data.pageIndex).then(function (page) { var rotatePromise = pdfManager.ensure(page, 'rotate'); var refPromise = pdfManager.ensure(page, 'ref'); + var userUnitPromise = pdfManager.ensure(page, 'userUnit'); var viewPromise = pdfManager.ensure(page, 'view'); return Promise.all([ rotatePromise, refPromise, + userUnitPromise, viewPromise ]).then(function (results) { return { rotate: results[0], ref: results[1], - view: results[2] + userUnit: results[2], + view: results[3] }; }); }); diff --git a/package.json b/package.json index ccc4ba93e..1e1d26be7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.6.336", + "version": "1.6.338", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [