mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-08 14:21:06 +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
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
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
|
||||||
|
@ -88,5 +88,9 @@ QPDFOutlineDocumentHelper::resolveNamedDest(QPDFObjectHandle name)
|
|||||||
if (!result.isInitialized()) {
|
if (!result.isInitialized()) {
|
||||||
return QPDFObjectHandle::newNull();
|
return QPDFObjectHandle::newNull();
|
||||||
}
|
}
|
||||||
|
if (result.isDictionary()) {
|
||||||
|
QTC::TC("qpdf", "QPDFOutlineDocumentHelper named dest dictionary");
|
||||||
|
return result.getKey("/D");
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,7 @@ QPDFOutlineObjectHelper action dest 0
|
|||||||
QPDFOutlineObjectHelper named dest 0
|
QPDFOutlineObjectHelper named dest 0
|
||||||
QPDFOutlineDocumentHelper name named dest 0
|
QPDFOutlineDocumentHelper name named dest 0
|
||||||
QPDFOutlineDocumentHelper string named dest 0
|
QPDFOutlineDocumentHelper string named dest 0
|
||||||
|
QPDFOutlineDocumentHelper named dest dictionary 0
|
||||||
QPDFOutlineObjectHelper loop 0
|
QPDFOutlineObjectHelper loop 0
|
||||||
QPDFObjectHandle merge top type mismatch 0
|
QPDFObjectHandle merge top type mismatch 0
|
||||||
QPDFObjectHandle merge shallow copy 0
|
QPDFObjectHandle merge shallow copy 0
|
||||||
|
@ -18,6 +18,7 @@ my @outline_files = (
|
|||||||
'page-labels-and-outlines',
|
'page-labels-and-outlines',
|
||||||
'outlines-with-actions',
|
'outlines-with-actions',
|
||||||
'outlines-with-old-root-dests',
|
'outlines-with-old-root-dests',
|
||||||
|
'outlines-with-old-root-dests-dict',
|
||||||
'outlines-with-loop',
|
'outlines-with-loop',
|
||||||
);
|
);
|
||||||
my $n_tests = scalar(@outline_files);
|
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