1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Telemetry for used stream and font types

This commit is contained in:
Yury Delendik 2014-06-16 09:52:04 -05:00
parent 7ac1c6b034
commit 0cd28ebfa3
11 changed files with 174 additions and 24 deletions

View file

@ -692,6 +692,10 @@ var XRef = (function XRefClosure() {
// prepare the XRef cache
this.cache = [];
this.password = password;
this.stats = {
streamTypes: [],
fontTypes: []
};
}
XRef.prototype = {
@ -1040,7 +1044,7 @@ var XRef = (function XRefClosure() {
var dict;
for (i = 0, ii = trailers.length; i < ii; ++i) {
stream.pos = trailers[i];
var parser = new Parser(new Lexer(stream), true, null);
var parser = new Parser(new Lexer(stream), true, this);
var obj = parser.getObj();
if (!isCmd(obj, 'trailer')) {
continue;
@ -1072,7 +1076,7 @@ var XRef = (function XRefClosure() {
stream.pos = startXRef + stream.start;
var parser = new Parser(new Lexer(stream), true, null);
var parser = new Parser(new Lexer(stream), true, this);
var obj = parser.getObj();
var dict;