Browse Source

PDF.js version 1.0.427

master v1.0.427
Yury Delendik 11 years ago
parent
commit
ecb9806625
  1. 2
      bower.json
  2. 113
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 113
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

113
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.425'; PDFJS.version = '1.0.427';
PDFJS.build = 'c28839b'; PDFJS.build = 'bb7e7d3';
(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
@ -23503,70 +23503,69 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
var args = null; var args = null;
while (true) { while (true) {
var obj = this.parser.getObj(); var obj = this.parser.getObj();
if (isEOF(obj)) { if (isCmd(obj)) {
return false; // no more commands var cmd = obj.cmd;
} // Check that the command is valid
if (!isCmd(obj)) { var opSpec = OP_MAP[cmd];
// argument if (!opSpec) {
if (obj !== null) { warn('Unknown command "' + cmd + '"');
if (!args) { continue;
args = [];
}
args.push((obj instanceof Dict ? obj.getAll() : obj));
assert(args.length <= 33, 'Too many arguments');
} }
continue;
}
var cmd = obj.cmd;
// Check that the command is valid
var opSpec = OP_MAP[cmd];
if (!opSpec) {
warn('Unknown command "' + cmd + '"');
continue;
}
var fn = opSpec.id; var fn = opSpec.id;
var numArgs = opSpec.numArgs; var numArgs = opSpec.numArgs;
if (!opSpec.variableArgs) { if (!opSpec.variableArgs) {
// Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf // Postscript commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf
var argsLength = args !== null ? args.length : 0; var argsLength = args !== null ? args.length : 0;
if (argsLength !== numArgs) { if (argsLength !== numArgs) {
var nonProcessedArgs = this.nonProcessedArgs; var nonProcessedArgs = this.nonProcessedArgs;
while (argsLength > numArgs) { while (argsLength > numArgs) {
nonProcessedArgs.push(args.shift()); nonProcessedArgs.push(args.shift());
argsLength--; argsLength--;
} }
while (argsLength < numArgs && nonProcessedArgs.length !== 0) { while (argsLength < numArgs && nonProcessedArgs.length !== 0) {
if (!args) { if (!args) {
args = []; args = [];
}
args.unshift(nonProcessedArgs.pop());
argsLength++;
} }
args.unshift(nonProcessedArgs.pop());
argsLength++;
} }
}
if (argsLength < numArgs) { if (argsLength < numArgs) {
// If we receive too few args, it's not possible to possible // If we receive too few args, it's not possible to possible
// to execute the command, so skip the command // to execute the command, so skip the command
info('Command ' + fn + ': because expected ' + info('Command ' + fn + ': because expected ' +
numArgs + ' args, but received ' + argsLength + numArgs + ' args, but received ' + argsLength +
' args; skipping'); ' args; skipping');
args = null; args = null;
continue; continue;
}
} else if (argsLength > numArgs) {
info('Command ' + fn + ': expected [0,' + numArgs +
'] args, but received ' + argsLength + ' args');
} }
} else if (argsLength > numArgs) {
info('Command ' + fn + ': expected [0,' + numArgs +
'] args, but received ' + argsLength + ' args');
}
// TODO figure out how to type-check vararg functions // TODO figure out how to type-check vararg functions
this.preprocessCommand(fn, args); this.preprocessCommand(fn, args);
operation.fn = fn; operation.fn = fn;
operation.args = args; operation.args = args;
return true; return true;
} else {
if (isEOF(obj)) {
return false; // no more commands
}
// argument
if (obj !== null) {
if (!args) {
args = [];
}
args.push((obj instanceof Dict ? obj.getAll() : obj));
assert(args.length <= 33, 'Too many arguments');
}
}
} }
}, },

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.425'; PDFJS.version = '1.0.427';
PDFJS.build = 'c28839b'; PDFJS.build = 'bb7e7d3';
(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

113
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.425'; PDFJS.version = '1.0.427';
PDFJS.build = 'c28839b'; PDFJS.build = 'bb7e7d3';
(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
@ -18667,70 +18667,69 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
var args = null; var args = null;
while (true) { while (true) {
var obj = this.parser.getObj(); var obj = this.parser.getObj();
if (isEOF(obj)) { if (isCmd(obj)) {
return false; // no more commands var cmd = obj.cmd;
} // Check that the command is valid
if (!isCmd(obj)) { var opSpec = OP_MAP[cmd];
// argument if (!opSpec) {
if (obj !== null) { warn('Unknown command "' + cmd + '"');
if (!args) { continue;
args = [];
}
args.push((obj instanceof Dict ? obj.getAll() : obj));
assert(args.length <= 33, 'Too many arguments');
} }
continue;
}
var cmd = obj.cmd;
// Check that the command is valid
var opSpec = OP_MAP[cmd];
if (!opSpec) {
warn('Unknown command "' + cmd + '"');
continue;
}
var fn = opSpec.id; var fn = opSpec.id;
var numArgs = opSpec.numArgs; var numArgs = opSpec.numArgs;
if (!opSpec.variableArgs) { if (!opSpec.variableArgs) {
// Some post script commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf // Postscript commands can be nested, e.g. /F2 /GS2 gs 5.711 Tf
var argsLength = args !== null ? args.length : 0; var argsLength = args !== null ? args.length : 0;
if (argsLength !== numArgs) { if (argsLength !== numArgs) {
var nonProcessedArgs = this.nonProcessedArgs; var nonProcessedArgs = this.nonProcessedArgs;
while (argsLength > numArgs) { while (argsLength > numArgs) {
nonProcessedArgs.push(args.shift()); nonProcessedArgs.push(args.shift());
argsLength--; argsLength--;
} }
while (argsLength < numArgs && nonProcessedArgs.length !== 0) { while (argsLength < numArgs && nonProcessedArgs.length !== 0) {
if (!args) { if (!args) {
args = []; args = [];
}
args.unshift(nonProcessedArgs.pop());
argsLength++;
} }
args.unshift(nonProcessedArgs.pop());
argsLength++;
} }
}
if (argsLength < numArgs) { if (argsLength < numArgs) {
// If we receive too few args, it's not possible to possible // If we receive too few args, it's not possible to possible
// to execute the command, so skip the command // to execute the command, so skip the command
info('Command ' + fn + ': because expected ' + info('Command ' + fn + ': because expected ' +
numArgs + ' args, but received ' + argsLength + numArgs + ' args, but received ' + argsLength +
' args; skipping'); ' args; skipping');
args = null; args = null;
continue; continue;
}
} else if (argsLength > numArgs) {
info('Command ' + fn + ': expected [0,' + numArgs +
'] args, but received ' + argsLength + ' args');
} }
} else if (argsLength > numArgs) {
info('Command ' + fn + ': expected [0,' + numArgs +
'] args, but received ' + argsLength + ' args');
}
// TODO figure out how to type-check vararg functions // TODO figure out how to type-check vararg functions
this.preprocessCommand(fn, args); this.preprocessCommand(fn, args);
operation.fn = fn; operation.fn = fn;
operation.args = args; operation.args = args;
return true; return true;
} else {
if (isEOF(obj)) {
return false; // no more commands
}
// argument
if (obj !== null) {
if (!args) {
args = [];
}
args.push((obj instanceof Dict ? obj.getAll() : obj));
assert(args.length <= 33, 'Too many arguments');
}
}
} }
}, },

2
package.json

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