mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Fix QPDFOutlineDocumentHelper::resolveNamedDest (fixes #1238)
Handle case where named destination is a dictionary with /D entry. Test case is hand-edited outlines-with-old-root-dests.pdf with modified object 107.
This commit is contained in:
parent
963574f27f
commit
f3cbaafcac
12
ChangeLog
12
ChangeLog
@ -1,6 +1,12 @@
|
||||
2024-07-14 M Holger <m.holger@qpdf.org>
|
||||
|
||||
* Bug fix: handle named destinations where the entry is a
|
||||
dictionary with /D entry instead of an explicit destination.
|
||||
Fixes #1238.
|
||||
|
||||
2024-07-04 M Holger <m.holger@qpdf.org>
|
||||
|
||||
* Treat corrupt JPEG streams as unfilterable. This avoids them
|
||||
* Treat corrupt JPEG streams as unfilterable. This avoids them
|
||||
getting uncompressed when writing PDF files with decode level all.
|
||||
|
||||
2024-07-02 Jay Berkenbilt <ejb@ql.org>
|
||||
@ -24,12 +30,12 @@
|
||||
|
||||
2024-06-29 M Holger <m.holger@qpdf.org>
|
||||
|
||||
* Bug fix: in QPDFOutlineObjectHelper detect loops in the list of
|
||||
* Bug fix: in QPDFOutlineObjectHelper detect loops in the list of
|
||||
direct children of an outline item.
|
||||
|
||||
2024-06-27 M Holger <m.holger@qpdf.org>
|
||||
|
||||
* Add sanity check in QPDF xref table reconstruction to reject
|
||||
* Add sanity check in QPDF xref table reconstruction to reject
|
||||
objects with impossibly large object id in order to improve
|
||||
handling of severely damaged PDF files.
|
||||
|
||||
|
@ -88,5 +88,9 @@ QPDFOutlineDocumentHelper::resolveNamedDest(QPDFObjectHandle name)
|
||||
if (!result.isInitialized()) {
|
||||
return QPDFObjectHandle::newNull();
|
||||
}
|
||||
if (result.isDictionary()) {
|
||||
QTC::TC("qpdf", "QPDFOutlineDocumentHelper named dest dictionary");
|
||||
return result.getKey("/D");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -356,6 +356,7 @@ QPDFOutlineObjectHelper action dest 0
|
||||
QPDFOutlineObjectHelper named dest 0
|
||||
QPDFOutlineDocumentHelper name named dest 0
|
||||
QPDFOutlineDocumentHelper string named dest 0
|
||||
QPDFOutlineDocumentHelper named dest dictionary 0
|
||||
QPDFOutlineObjectHelper loop 0
|
||||
QPDFObjectHandle merge top type mismatch 0
|
||||
QPDFObjectHandle merge shallow copy 0
|
||||
|
@ -18,6 +18,7 @@ my @outline_files = (
|
||||
'page-labels-and-outlines',
|
||||
'outlines-with-actions',
|
||||
'outlines-with-old-root-dests',
|
||||
'outlines-with-old-root-dests-dict',
|
||||
'outlines-with-loop',
|
||||
);
|
||||
my $n_tests = scalar(@outline_files);
|
||||
|
12
qpdf/qtest/qpdf/outlines-with-old-root-dests-dict.out
Normal file
12
qpdf/qtest/qpdf/outlines-with-old-root-dests-dict.out
Normal file
@ -0,0 +1,12 @@
|
||||
page 0: •Merschqaberschq (A) 1.2.2 -> 0: /XYZ null null null -> [ 6 0 R /XYZ null null null ]
|
||||
page 1: •Gabeebeebee (name) 1.2.1 -> 1: /FitR 66 714 180 770 -> [ 7 0 R /FitR 66 714 180 770 ]
|
||||
page 5: •Potato 1 -> 5: /XYZ null null null -> [ 11 0 R /XYZ null null null ]
|
||||
page 11: •Mern 1.1 -> 11: /Fit -> [ 17 0 R /Fit ]
|
||||
page 12: •Biherbadem 1.1.1 -> 12: /FitV 100 -> [ 18 0 R /FitV 100 ]
|
||||
page 12: •Gawehwehweh 1.1.2 -> 12: /XYZ null null null -> [ 18 0 R /XYZ null null null ]
|
||||
page 13: •Squash ÷πʬ÷ 1.2 -> 13: /FitH 792 -> [ 19 0 R /FitH 792 ]
|
||||
page 15: •Salad 2 -> 15: /XYZ 66 756 3 -> [ 21 0 R /XYZ 66 756 3 ]
|
||||
page 18: •Glarpenspliel (A, name) 1.1.1.1 -> 18: /XYZ null null null -> [ 24 0 R /XYZ null null null ]
|
||||
page 19: •Hagoogamagoogle 1.1.1.2 -> 19: /XYZ null null null -> [ 25 0 R /XYZ null null null ]
|
||||
page 22: •Jawarnianbvarwash 1.1.2.1 -> 22: /XYZ null null null -> [ 28 0 R /XYZ null null null ]
|
||||
test 49 done
|
1569
qpdf/qtest/qpdf/outlines-with-old-root-dests-dict.pdf
Normal file
1569
qpdf/qtest/qpdf/outlines-with-old-root-dests-dict.pdf
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user