factor out isSpace
This commit is contained in:
parent
506828d522
commit
a2dcda8be5
16
pdf.js
16
pdf.js
@ -84,6 +84,14 @@ var StringStream = (function () {
|
|||||||
return constructor;
|
return constructor;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
var FlateStream = (function() {
|
||||||
|
const codeLenCodeMap = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5,
|
||||||
|
11, 4, 12, 3, 13, 2, 14, 1, 15];
|
||||||
|
|
||||||
|
function constructor(str, pred, columns, colors, bits) {
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
var DecryptStream = (function() {
|
var DecryptStream = (function() {
|
||||||
function constructor(str, fileKey, encAlgorithm, keyLength) {
|
function constructor(str, fileKey, encAlgorithm, keyLength) {
|
||||||
// TODO
|
// TODO
|
||||||
@ -214,6 +222,10 @@ var Lexer = (function() {
|
|||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constructor.isSpace = function(ch) {
|
||||||
|
return ch == " " || ch == "\t";
|
||||||
|
}
|
||||||
|
|
||||||
// A '1' in this array means the character is white space. A '1' or
|
// A '1' in this array means the character is white space. A '1' or
|
||||||
// '2' means the character ends a name or command.
|
// '2' means the character ends a name or command.
|
||||||
var specialChars = [
|
var specialChars = [
|
||||||
@ -660,6 +672,8 @@ var Parser = (function() {
|
|||||||
return stream;
|
return stream;
|
||||||
},
|
},
|
||||||
makeFilter: function(stream, name, params) {
|
makeFilter: function(stream, name, params) {
|
||||||
|
print(name);
|
||||||
|
print(uneval(params));
|
||||||
// TODO
|
// TODO
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
@ -892,7 +906,7 @@ var PDFDoc = (function () {
|
|||||||
if (stream.find("startxref", 1024, true)) {
|
if (stream.find("startxref", 1024, true)) {
|
||||||
stream.skip(9);
|
stream.skip(9);
|
||||||
var ch;
|
var ch;
|
||||||
while ((ch = stream.getChar()) == " " || ch == "\t")
|
while (Lexer.isSpace(ch = stream.getChar()))
|
||||||
;
|
;
|
||||||
var str = "";
|
var str = "";
|
||||||
while ((ch - "0") <= 9) {
|
while ((ch - "0") <= 9) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user