mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Fixes rendering of PDFs with nested trailer dictionary
This commit is contained in:
parent
f0043f8727
commit
6b9aeb34f1
1 changed files with 5 additions and 0 deletions
|
@ -731,6 +731,11 @@ var XRef = (function XRefClosure() {
|
||||||
// The parser goes through the entire stream << ... >> and provides
|
// The parser goes through the entire stream << ... >> and provides
|
||||||
// a getter interface for the key-value table
|
// a getter interface for the key-value table
|
||||||
var dict = parser.getObj();
|
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)) {
|
if (!isDict(dict)) {
|
||||||
error('Invalid XRef table: could not parse trailer dictionary');
|
error('Invalid XRef table: could not parse trailer dictionary');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue