mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-26 08:57:21 +02:00
Re-factor the "nested trailer dictionary" check (PR 4731 follow-up)
In the `pr4731.pdf` document the trailer is actually a Stream, rather than the expected Dictionary, hence update the "nested trailer dictionary" check to make that clearer. *Note:* This is something that I happened to noticed while working on the previous patch.
This commit is contained in:
parent
1ee8705093
commit
a7b7cec2e7
@ -214,7 +214,7 @@ class XRef {
|
|||||||
let dict = parser.getObj();
|
let dict = parser.getObj();
|
||||||
|
|
||||||
// The pdflib PDF generator can generate a nested trailer dictionary
|
// The pdflib PDF generator can generate a nested trailer dictionary
|
||||||
if (!(dict instanceof Dict) && dict.dict) {
|
if (dict instanceof BaseStream) {
|
||||||
dict = dict.dict;
|
dict = dict.dict;
|
||||||
}
|
}
|
||||||
if (!(dict instanceof Dict)) {
|
if (!(dict instanceof Dict)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user