Browse Source

PDF.js version 1.4.109 - See mozilla/pdf.js@22341c07617f83d05d2582c53e8cb65931fdfddf

master v1.4.109
Pdf Bot 9 years ago
parent
commit
d3adfd2834
  1. 2
      bower.json
  2. 1438
      build/pdf.combined.js
  3. 55
      build/pdf.js
  4. 1438
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

1438
build/pdf.combined.js

File diff suppressed because it is too large Load Diff

55
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.4.107';
var pdfjsBuild = '4d9a3d4';
var pdfjsVersion = '1.4.109';
var pdfjsBuild = '22341c0';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -699,6 +699,55 @@ function stringToBytes(str) { @@ -699,6 +699,55 @@ function stringToBytes(str) {
return bytes;
}
/**
* Gets length of the array (Array, Uint8Array, or string) in bytes.
* @param {Array|Uint8Array|string} arr
* @returns {number}
*/
function arrayByteLength(arr) {
if (arr.length !== undefined) {
return arr.length;
}
assert(arr.byteLength !== undefined);
return arr.byteLength;
}
/**
* Combines array items (arrays) into single Uint8Array object.
* @param {Array} arr - the array of the arrays (Array, Uint8Array, or string).
* @returns {Uint8Array}
*/
function arraysToBytes(arr) {
// Shortcut: if first and only item is Uint8Array, return it.
if (arr.length === 1 && (arr[0] instanceof Uint8Array)) {
return arr[0];
}
var resultLength = 0;
var i, ii = arr.length;
var item, itemLength ;
for (i = 0; i < ii; i++) {
item = arr[i];
itemLength = arrayByteLength(item);
resultLength += itemLength;
}
var pos = 0;
var data = new Uint8Array(resultLength);
for (i = 0; i < ii; i++) {
item = arr[i];
if (!(item instanceof Uint8Array)) {
if (typeof item === 'string') {
item = stringToBytes(item);
} else {
item = new Uint8Array(item);
}
}
itemLength = item.byteLength;
data.set(item, pos);
pos += itemLength;
}
return data;
}
function string32(value) {
return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,
(value >> 8) & 0xff, value & 0xff);
@ -2483,6 +2532,8 @@ exports.UnexpectedResponseException = UnexpectedResponseException; @@ -2483,6 +2532,8 @@ exports.UnexpectedResponseException = UnexpectedResponseException;
exports.UnknownErrorException = UnknownErrorException;
exports.Util = Util;
exports.XRefParseException = XRefParseException;
exports.arrayByteLength = arrayByteLength;
exports.arraysToBytes = arraysToBytes;
exports.assert = assert;
exports.bytesToString = bytesToString;
exports.combineUrl = combineUrl;

1438
build/pdf.worker.js vendored

File diff suppressed because it is too large Load Diff

2
package.json

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

Loading…
Cancel
Save