Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #150 #152

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/lib/pdfjs-dist/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.512",
"version": "1.9.524",
"main": [
"build/pdf.js",
"build/pdf.worker.js"
Expand Down
210 changes: 99 additions & 111 deletions build/lib/pdfjs-dist/build/pdf.combined.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/lib/pdfjs-dist/build/pdf.combined.js.map

Large diffs are not rendered by default.

43 changes: 17 additions & 26 deletions build/lib/pdfjs-dist/build/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isInt = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.isArray = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.loadJpegStream = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isNodeJS = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.StatTimer = exports.PasswordResponses = exports.PasswordException = exports.PageViewport = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.MessageHandler = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VERBOSITY_LEVELS = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

Expand Down Expand Up @@ -713,7 +713,7 @@ var Util = function UtilClosure() {
};
var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'];
Util.toRoman = function Util_toRoman(number, lowerCase) {
assert(isInt(number) && number > 0, 'The number should be a positive integer.');
assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.');
var pos,
romanBuf = [];
while (number >= 1000) {
Expand Down Expand Up @@ -886,18 +886,12 @@ function isEmptyObj(obj) {
function isBool(v) {
return typeof v === 'boolean';
}
function isInt(v) {
return typeof v === 'number' && (v | 0) === v;
}
function isNum(v) {
return typeof v === 'number';
}
function isString(v) {
return typeof v === 'string';
}
function isArray(v) {
return v instanceof Array;
}
function isArrayBuffer(v) {
return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v !== null && v.byteLength !== undefined;
}
Expand Down Expand Up @@ -1455,11 +1449,9 @@ exports.deprecated = deprecated;
exports.getLookupTableFactory = getLookupTableFactory;
exports.getVerbosityLevel = getVerbosityLevel;
exports.info = info;
exports.isArray = isArray;
exports.isArrayBuffer = isArrayBuffer;
exports.isBool = isBool;
exports.isEmptyObj = isEmptyObj;
exports.isInt = isInt;
exports.isNum = isNum;
exports.isString = isString;
exports.isSpace = isSpace;
Expand Down Expand Up @@ -2213,9 +2205,8 @@ function validateRangeRequestCapabilities(_ref) {
if (contentEncoding !== 'identity') {
return returnValues;
}
var length = getResponseHeader('Content-Length');
length = parseInt(length, 10);
if (!(0, _util.isInt)(length)) {
var length = parseInt(getResponseHeader('Content-Length'), 10);
if (!Number.isInteger(length)) {
return returnValues;
}
returnValues.suggestedLength = length;
Expand Down Expand Up @@ -3898,7 +3889,7 @@ var WorkerTransport = function WorkerTransportClosure() {
getPage: function WorkerTransport_getPage(pageNumber, capability) {
var _this13 = this;

if (!(0, _util.isInt)(pageNumber) || pageNumber <= 0 || pageNumber > this.numPages) {
if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this.numPages) {
return Promise.reject(new Error('Invalid page request'));
}
var pageIndex = pageNumber - 1;
Expand Down Expand Up @@ -4185,8 +4176,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.512';
exports.build = build = '066fea9c';
exports.version = version = '1.9.524';
exports.build = build = 'cd25a51a';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
Expand Down Expand Up @@ -6997,10 +6988,10 @@ var SVGGraphics = function SVGGraphics() {
this.paintInlineImageXObject(imgData, mask);
},
paintFormXObjectBegin: function SVGGraphics_paintFormXObjectBegin(matrix, bbox) {
if ((0, _util.isArray)(matrix) && matrix.length === 6) {
if (Array.isArray(matrix) && matrix.length === 6) {
this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
}
if ((0, _util.isArray)(bbox) && bbox.length === 4) {
if (Array.isArray(bbox) && bbox.length === 4) {
var width = bbox[2] - bbox[0];
var height = bbox[3] - bbox[1];
var cliprect = document.createElementNS(NS, 'svg:rect');
Expand Down Expand Up @@ -7064,8 +7055,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";


var pdfjsVersion = '1.9.512';
var pdfjsBuild = '066fea9c';
var pdfjsVersion = '1.9.524';
var pdfjsBuild = 'cd25a51a';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(82);
var pdfjsDisplayAPI = __w_pdfjs_require__(48);
Expand Down Expand Up @@ -12927,8 +12918,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.512';
PDFJS.build = '066fea9c';
PDFJS.version = '1.9.524';
PDFJS.build = 'cd25a51a';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
Expand Down Expand Up @@ -14686,11 +14677,11 @@ var CanvasGraphics = function CanvasGraphicsClosure() {
paintFormXObjectBegin: function CanvasGraphics_paintFormXObjectBegin(matrix, bbox) {
this.save();
this.baseTransformStack.push(this.baseTransform);
if ((0, _util.isArray)(matrix) && matrix.length === 6) {
if (Array.isArray(matrix) && matrix.length === 6) {
this.transform.apply(this, matrix);
}
this.baseTransform = this.ctx.mozCurrentTransform;
if ((0, _util.isArray)(bbox) && bbox.length === 4) {
if (Array.isArray(bbox) && bbox.length === 4) {
var width = bbox[2] - bbox[0];
var height = bbox[3] - bbox[1];
this.ctx.rect(bbox[0], bbox[1], width, height);
Expand Down Expand Up @@ -14798,7 +14789,7 @@ var CanvasGraphics = function CanvasGraphicsClosure() {
this.save();
resetCtxToDefault(this.ctx);
this.current = new CanvasExtraState();
if ((0, _util.isArray)(rect) && rect.length === 4) {
if (Array.isArray(rect) && rect.length === 4) {
var width = rect[2] - rect[0];
var height = rect[3] - rect[1];
this.ctx.rect(rect[0], rect[1], width, height);
Expand Down Expand Up @@ -15403,7 +15394,7 @@ var TilingPattern = function TilingPatternClosure() {
this.ctx.scale(1 / scale[0], 1 / scale[1]);
},
clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
if ((0, _util.isArray)(bbox) && bbox.length === 4) {
if (Array.isArray(bbox) && bbox.length === 4) {
var bboxWidth = x1 - x0;
var bboxHeight = y1 - y0;
graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
Expand Down
2 changes: 1 addition & 1 deletion build/lib/pdfjs-dist/build/pdf.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/lib/pdfjs-dist/build/pdf.min.js

Large diffs are not rendered by default.

Loading