Merge pull request #4731 from timvandermeij/trailerdict

Fixes rendering of PDFs with nested trailer dictionary
This commit is contained in:
Yury Delendik 2014-05-02 14:41:19 -05:00
commit f8b3444b18

View File

@ -731,6 +731,11 @@ var XRef = (function XRefClosure() {
// The parser goes through the entire stream << ... >> and provides
// a getter interface for the key-value table
var dict = parser.getObj();
// The pdflib PDF generator can generate a nested trailer dictionary
if (!isDict(dict) && dict.dict) {
dict = dict.dict;
}
if (!isDict(dict)) {
error('Invalid XRef table: could not parse trailer dictionary');
}