|
|
|
@ -1,5 +1,6 @@
@@ -1,5 +1,6 @@
|
|
|
|
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
|
|
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ |
|
|
|
|
/* globals assertWellFormed, bytesToString, CipherTransformFactory, error, info, InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef, isStream, JpegStream, Lexer, log, Page, Parser, Promise, shadow, stringToPDFString, stringToUTF8String, warn */ |
|
|
|
|
/* Copyright 2012 Mozilla Foundation |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
@ -100,7 +101,7 @@ var Dict = (function DictClosure() {
@@ -100,7 +101,7 @@ var Dict = (function DictClosure() {
|
|
|
|
|
callback(key, this.get(key)); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Dict; |
|
|
|
|
})(); |
|
|
|
@ -442,7 +443,7 @@ var XRef = (function XRefClosure() {
@@ -442,7 +443,7 @@ var XRef = (function XRefClosure() {
|
|
|
|
|
for (j = 0; j < typeFieldWidth; ++j) |
|
|
|
|
type = (type << 8) | stream.getByte(); |
|
|
|
|
// if type field is absent, its default value = 1
|
|
|
|
|
if (typeFieldWidth == 0) |
|
|
|
|
if (typeFieldWidth === 0) |
|
|
|
|
type = 1; |
|
|
|
|
for (j = 0; j < offsetFieldWidth; ++j) |
|
|
|
|
offset = (offset << 8) | stream.getByte(); |
|
|
|
@ -678,7 +679,7 @@ var XRef = (function XRefClosure() {
@@ -678,7 +679,7 @@ var XRef = (function XRefClosure() {
|
|
|
|
|
} |
|
|
|
|
if (!isCmd(obj3, 'obj')) { |
|
|
|
|
// some bad pdfs use "obj1234" and really mean 1234
|
|
|
|
|
if (obj3.cmd.indexOf('obj') == 0) { |
|
|
|
|
if (obj3.cmd.indexOf('obj') === 0) { |
|
|
|
|
num = parseInt(obj3.cmd.substring(3), 10); |
|
|
|
|
if (!isNaN(num)) |
|
|
|
|
return num; |
|
|
|
|