Remove some debug leftover
This commit is contained in:
parent
e302bd93ee
commit
c663d181f9
17
PDFFont.js
17
PDFFont.js
@ -1,11 +1,14 @@
|
|||||||
|
|
||||||
var Font = new Dict();
|
/*
|
||||||
|
* This dictionary hold the decoded fonts
|
||||||
|
*/
|
||||||
|
var Fonts = new Dict();
|
||||||
|
|
||||||
var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
||||||
var lexer = new Lexer(aAsciiStream);
|
var lexer = new Lexer(aAsciiStream);
|
||||||
|
|
||||||
// Turn on this flag for additional debugging logs
|
// Turn on this flag for additional debugging logs
|
||||||
var debug = true;
|
var debug = false;
|
||||||
|
|
||||||
var dump = function(aData) {
|
var dump = function(aData) {
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -350,7 +353,7 @@ var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "dup":
|
case "dup":
|
||||||
//log("duplicate: " + operandStack.peek());
|
dump("duplicate: " + operandStack.peek());
|
||||||
operandStack.push(operandStack.peek());
|
operandStack.push(operandStack.peek());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -389,10 +392,6 @@ var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
|||||||
case "get":
|
case "get":
|
||||||
var indexOrKey = operandStack.pop();
|
var indexOrKey = operandStack.pop();
|
||||||
var object = operandStack.pop();
|
var object = operandStack.pop();
|
||||||
log("==============");
|
|
||||||
operandStack.toString();
|
|
||||||
log(dictionaryStack.__innerStack__);
|
|
||||||
log(object + "::" + indexOrKey);
|
|
||||||
var data = object.get ? object.get(indexOrKey) : object[indexOrKey];
|
var data = object.get ? object.get(indexOrKey) : object[indexOrKey];
|
||||||
dump("get " + obj + "[" + indexOrKey + "]: " + data);
|
dump("get " + obj + "[" + indexOrKey + "]: " + data);
|
||||||
operandStack.push(data);
|
operandStack.push(data);
|
||||||
@ -448,7 +447,7 @@ var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
|||||||
var font = operandStack.pop();
|
var font = operandStack.pop();
|
||||||
var key = operandStack.pop();
|
var key = operandStack.pop();
|
||||||
dump("definefont " + font + " with key: " + key);
|
dump("definefont " + font + " with key: " + key);
|
||||||
Font.set(key, font);
|
Fonts.set(key, font);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "known":
|
case "known":
|
||||||
@ -547,7 +546,7 @@ var Type1Parser = function(aAsciiStream, aBinaryStream) {
|
|||||||
|
|
||||||
return parseNext();
|
return parseNext();
|
||||||
} else if (obj){
|
} else if (obj){
|
||||||
log (obj);
|
dump("unknow: " + obj);
|
||||||
operandStack.push(obj);
|
operandStack.push(obj);
|
||||||
return parseNext();
|
return parseNext();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user