Browse Source

PDF.js version 1.0.247

master v1.0.247
Yury Delendik 10 years ago
parent
commit
040d2685eb
  1. 2
      bower.json
  2. 49
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 49
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.245", "version": "1.0.247",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

49
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.245'; PDFJS.version = '1.0.247';
PDFJS.build = '0026075'; PDFJS.build = 'f000c04';
(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
@ -38740,12 +38740,14 @@ var Parser = (function ParserClosure() {
} }
}, },
getObj: function Parser_getObj(cipherTransform) { getObj: function Parser_getObj(cipherTransform) {
if (isCmd(this.buf1, 'BI')) { // inline image var buf1 = this.buf1;
this.shift(); this.shift();
if (buf1 instanceof Cmd) {
switch (buf1.cmd) {
case 'BI': // inline image
return this.makeInlineImage(cipherTransform); return this.makeInlineImage(cipherTransform);
} case '[': // array
if (isCmd(this.buf1, '[')) { // array
this.shift();
var array = []; var array = [];
while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) { while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
array.push(this.getObj(cipherTransform)); array.push(this.getObj(cipherTransform));
@ -38755,9 +38757,7 @@ var Parser = (function ParserClosure() {
} }
this.shift(); this.shift();
return array; return array;
} case '<<': // dictionary or stream
if (isCmd(this.buf1, '<<')) { // dictionary or stream
this.shift();
var dict = new Dict(this.xref); var dict = new Dict(this.xref);
while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) { while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
if (!isName(this.buf1)) { if (!isName(this.buf1)) {
@ -38785,10 +38785,13 @@ var Parser = (function ParserClosure() {
} }
this.shift(); this.shift();
return dict; return dict;
default: // simple object
return buf1;
} }
if (isInt(this.buf1)) { // indirect reference or integer }
var num = this.buf1;
this.shift(); if (isInt(buf1)) { // indirect reference or integer
var num = buf1;
if (isInt(this.buf1) && isCmd(this.buf2, 'R')) { if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
var ref = new Ref(num, this.buf1); var ref = new Ref(num, this.buf1);
this.shift(); this.shift();
@ -38797,9 +38800,9 @@ var Parser = (function ParserClosure() {
} }
return num; return num;
} }
if (isString(this.buf1)) { // string
var str = this.buf1; if (isString(buf1)) { // string
this.shift(); var str = buf1;
if (cipherTransform) { if (cipherTransform) {
str = cipherTransform.decryptString(str); str = cipherTransform.decryptString(str);
} }
@ -38807,9 +38810,7 @@ var Parser = (function ParserClosure() {
} }
// simple object // simple object
var obj = this.buf1; return buf1;
this.shift();
return obj;
}, },
makeInlineImage: function Parser_makeInlineImage(cipherTransform) { makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
var lexer = this.lexer; var lexer = this.lexer;
@ -39314,7 +39315,7 @@ var Lexer = (function LexerClosure() {
var x = toHexDigit(ch); var x = toHexDigit(ch);
if (x != -1) { if (x != -1) {
var x2 = toHexDigit(this.nextChar()); var x2 = toHexDigit(this.nextChar());
if (x2 == -1) { if (x2 === -1) {
error('Illegal digit in hex char in name: ' + x2); error('Illegal digit in hex char in name: ' + x2);
} }
strBuf.push(String.fromCharCode((x << 4) | x2)); strBuf.push(String.fromCharCode((x << 4) | x2));
@ -39380,7 +39381,7 @@ var Lexer = (function LexerClosure() {
return EOF; return EOF;
} }
if (comment) { if (comment) {
if (ch === 0x0A || ch == 0x0D) { // LF, CR if (ch === 0x0A || ch === 0x0D) { // LF, CR
comment = false; comment = false;
} }
} else if (ch === 0x25) { // '%' } else if (ch === 0x25) { // '%'
@ -39447,19 +39448,19 @@ var Lexer = (function LexerClosure() {
if (knownCommandFound && !(possibleCommand in knownCommands)) { if (knownCommandFound && !(possibleCommand in knownCommands)) {
break; break;
} }
if (str.length == 128) { if (str.length === 128) {
error('Command token too long: ' + str.length); error('Command token too long: ' + str.length);
} }
str = possibleCommand; str = possibleCommand;
knownCommandFound = knownCommands && (str in knownCommands); knownCommandFound = knownCommands && (str in knownCommands);
} }
if (str == 'true') { if (str === 'true') {
return true; return true;
} }
if (str == 'false') { if (str === 'false') {
return false; return false;
} }
if (str == 'null') { if (str === 'null') {
return null; return null;
} }
return Cmd.get(str); return Cmd.get(str);

4
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.245'; PDFJS.version = '1.0.247';
PDFJS.build = '0026075'; PDFJS.build = 'f000c04';
(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

49
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.245'; PDFJS.version = '1.0.247';
PDFJS.build = '0026075'; PDFJS.build = 'f000c04';
(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
@ -34233,12 +34233,14 @@ var Parser = (function ParserClosure() {
} }
}, },
getObj: function Parser_getObj(cipherTransform) { getObj: function Parser_getObj(cipherTransform) {
if (isCmd(this.buf1, 'BI')) { // inline image var buf1 = this.buf1;
this.shift(); this.shift();
if (buf1 instanceof Cmd) {
switch (buf1.cmd) {
case 'BI': // inline image
return this.makeInlineImage(cipherTransform); return this.makeInlineImage(cipherTransform);
} case '[': // array
if (isCmd(this.buf1, '[')) { // array
this.shift();
var array = []; var array = [];
while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) { while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) {
array.push(this.getObj(cipherTransform)); array.push(this.getObj(cipherTransform));
@ -34248,9 +34250,7 @@ var Parser = (function ParserClosure() {
} }
this.shift(); this.shift();
return array; return array;
} case '<<': // dictionary or stream
if (isCmd(this.buf1, '<<')) { // dictionary or stream
this.shift();
var dict = new Dict(this.xref); var dict = new Dict(this.xref);
while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) { while (!isCmd(this.buf1, '>>') && !isEOF(this.buf1)) {
if (!isName(this.buf1)) { if (!isName(this.buf1)) {
@ -34278,10 +34278,13 @@ var Parser = (function ParserClosure() {
} }
this.shift(); this.shift();
return dict; return dict;
default: // simple object
return buf1;
} }
if (isInt(this.buf1)) { // indirect reference or integer }
var num = this.buf1;
this.shift(); if (isInt(buf1)) { // indirect reference or integer
var num = buf1;
if (isInt(this.buf1) && isCmd(this.buf2, 'R')) { if (isInt(this.buf1) && isCmd(this.buf2, 'R')) {
var ref = new Ref(num, this.buf1); var ref = new Ref(num, this.buf1);
this.shift(); this.shift();
@ -34290,9 +34293,9 @@ var Parser = (function ParserClosure() {
} }
return num; return num;
} }
if (isString(this.buf1)) { // string
var str = this.buf1; if (isString(buf1)) { // string
this.shift(); var str = buf1;
if (cipherTransform) { if (cipherTransform) {
str = cipherTransform.decryptString(str); str = cipherTransform.decryptString(str);
} }
@ -34300,9 +34303,7 @@ var Parser = (function ParserClosure() {
} }
// simple object // simple object
var obj = this.buf1; return buf1;
this.shift();
return obj;
}, },
makeInlineImage: function Parser_makeInlineImage(cipherTransform) { makeInlineImage: function Parser_makeInlineImage(cipherTransform) {
var lexer = this.lexer; var lexer = this.lexer;
@ -34807,7 +34808,7 @@ var Lexer = (function LexerClosure() {
var x = toHexDigit(ch); var x = toHexDigit(ch);
if (x != -1) { if (x != -1) {
var x2 = toHexDigit(this.nextChar()); var x2 = toHexDigit(this.nextChar());
if (x2 == -1) { if (x2 === -1) {
error('Illegal digit in hex char in name: ' + x2); error('Illegal digit in hex char in name: ' + x2);
} }
strBuf.push(String.fromCharCode((x << 4) | x2)); strBuf.push(String.fromCharCode((x << 4) | x2));
@ -34873,7 +34874,7 @@ var Lexer = (function LexerClosure() {
return EOF; return EOF;
} }
if (comment) { if (comment) {
if (ch === 0x0A || ch == 0x0D) { // LF, CR if (ch === 0x0A || ch === 0x0D) { // LF, CR
comment = false; comment = false;
} }
} else if (ch === 0x25) { // '%' } else if (ch === 0x25) { // '%'
@ -34940,19 +34941,19 @@ var Lexer = (function LexerClosure() {
if (knownCommandFound && !(possibleCommand in knownCommands)) { if (knownCommandFound && !(possibleCommand in knownCommands)) {
break; break;
} }
if (str.length == 128) { if (str.length === 128) {
error('Command token too long: ' + str.length); error('Command token too long: ' + str.length);
} }
str = possibleCommand; str = possibleCommand;
knownCommandFound = knownCommands && (str in knownCommands); knownCommandFound = knownCommands && (str in knownCommands);
} }
if (str == 'true') { if (str === 'true') {
return true; return true;
} }
if (str == 'false') { if (str === 'false') {
return false; return false;
} }
if (str == 'null') { if (str === 'null') {
return null; return null;
} }
return Cmd.get(str); return Cmd.get(str);

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.245", "version": "1.0.247",
"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