Browse Source

PDF.js version 1.1.401

master v1.1.401
Pdf Bot 10 years ago
parent
commit
3110276e05
  1. 2
      bower.json
  2. 21
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 21
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

21
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.399'; PDFJS.version = '1.1.401';
PDFJS.build = '23cb01c'; PDFJS.build = '5dcd409';
(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
@ -10547,9 +10547,12 @@ var XRef = (function XRefClosure() {
indexObjects: function XRef_indexObjects() { indexObjects: function XRef_indexObjects() {
// Simple scan through the PDF content to find objects, // Simple scan through the PDF content to find objects,
// trailers and XRef streams. // trailers and XRef streams.
var TAB = 0x9, LF = 0xA, CR = 0xD, SPACE = 0x20;
var PERCENT = 0x25, LT = 0x3C;
function readToken(data, offset) { function readToken(data, offset) {
var token = '', ch = data[offset]; var token = '', ch = data[offset];
while (ch !== 13 && ch !== 10) { while (ch !== LF && ch !== CR && ch !== LT) {
if (++offset >= data.length) { if (++offset >= data.length) {
break; break;
} }
@ -10581,6 +10584,9 @@ var XRef = (function XRefClosure() {
var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]); var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]);
var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]);
// Clear out any existing entries, since they may be bogus.
this.entries.length = 0;
var stream = this.stream; var stream = this.stream;
stream.pos = 0; stream.pos = 0;
var buffer = stream.getBytes(); var buffer = stream.getBytes();
@ -10588,23 +10594,24 @@ var XRef = (function XRefClosure() {
var trailers = [], xrefStms = []; var trailers = [], xrefStms = [];
while (position < length) { while (position < length) {
var ch = buffer[position]; var ch = buffer[position];
if (ch === 32 || ch === 9 || ch === 13 || ch === 10) { if (ch === TAB || ch === LF || ch === CR || ch === SPACE) {
++position; ++position;
continue; continue;
} }
if (ch === 37) { // %-comment if (ch === PERCENT) { // %-comment
do { do {
++position; ++position;
if (position >= length) { if (position >= length) {
break; break;
} }
ch = buffer[position]; ch = buffer[position];
} while (ch !== 13 && ch !== 10); } while (ch !== LF && ch !== CR);
continue; continue;
} }
var token = readToken(buffer, position); var token = readToken(buffer, position);
var m; var m;
if (token === 'xref') { if (token.indexOf('xref') === 0 &&
(token.length === 4 || /\s/.test(token[4]))) {
position += skipUntil(buffer, position, trailerBytes); position += skipUntil(buffer, position, trailerBytes);
trailers.push(position); trailers.push(position);
position += skipUntil(buffer, position, startxrefBytes); position += skipUntil(buffer, position, startxrefBytes);

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.399'; PDFJS.version = '1.1.401';
PDFJS.build = '23cb01c'; PDFJS.build = '5dcd409';
(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

21
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.399'; PDFJS.version = '1.1.401';
PDFJS.build = '23cb01c'; PDFJS.build = '5dcd409';
(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
@ -4093,9 +4093,12 @@ var XRef = (function XRefClosure() {
indexObjects: function XRef_indexObjects() { indexObjects: function XRef_indexObjects() {
// Simple scan through the PDF content to find objects, // Simple scan through the PDF content to find objects,
// trailers and XRef streams. // trailers and XRef streams.
var TAB = 0x9, LF = 0xA, CR = 0xD, SPACE = 0x20;
var PERCENT = 0x25, LT = 0x3C;
function readToken(data, offset) { function readToken(data, offset) {
var token = '', ch = data[offset]; var token = '', ch = data[offset];
while (ch !== 13 && ch !== 10) { while (ch !== LF && ch !== CR && ch !== LT) {
if (++offset >= data.length) { if (++offset >= data.length) {
break; break;
} }
@ -4127,6 +4130,9 @@ var XRef = (function XRefClosure() {
var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]); var endobjBytes = new Uint8Array([101, 110, 100, 111, 98, 106]);
var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]);
// Clear out any existing entries, since they may be bogus.
this.entries.length = 0;
var stream = this.stream; var stream = this.stream;
stream.pos = 0; stream.pos = 0;
var buffer = stream.getBytes(); var buffer = stream.getBytes();
@ -4134,23 +4140,24 @@ var XRef = (function XRefClosure() {
var trailers = [], xrefStms = []; var trailers = [], xrefStms = [];
while (position < length) { while (position < length) {
var ch = buffer[position]; var ch = buffer[position];
if (ch === 32 || ch === 9 || ch === 13 || ch === 10) { if (ch === TAB || ch === LF || ch === CR || ch === SPACE) {
++position; ++position;
continue; continue;
} }
if (ch === 37) { // %-comment if (ch === PERCENT) { // %-comment
do { do {
++position; ++position;
if (position >= length) { if (position >= length) {
break; break;
} }
ch = buffer[position]; ch = buffer[position];
} while (ch !== 13 && ch !== 10); } while (ch !== LF && ch !== CR);
continue; continue;
} }
var token = readToken(buffer, position); var token = readToken(buffer, position);
var m; var m;
if (token === 'xref') { if (token.indexOf('xref') === 0 &&
(token.length === 4 || /\s/.test(token[4]))) {
position += skipUntil(buffer, position, trailerBytes); position += skipUntil(buffer, position, trailerBytes);
trailers.push(position); trailers.push(position);
position += skipUntil(buffer, position, startxrefBytes); position += skipUntil(buffer, position, startxrefBytes);

2
package.json

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

Loading…
Cancel
Save