diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-06-25 17:29:32 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-06-25 19:25:35 +0200 |
commit | 8a32515a62960af10abfb863157a4c67ea3b506f (patch) | |
tree | 75d1609958b6fa555702d5fe4910b4cbead2d35d /libqpdf | |
parent | 272fb9de9d1c4a1ff921b183a03e6b8633c9bd91 (diff) | |
download | qpdf-8a32515a62960af10abfb863157a4c67ea3b506f.tar.zst |
Add warnings for some additional page tree repair
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF_pages.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index e8416b2b..d43267d2 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -110,12 +110,19 @@ QPDF::getAllPagesInternal( QPDFObjectHandle kid = kids.getArrayItem(i); if (!kid.isIndirect()) { QTC::TC("qpdf", "QPDF handle direct page object"); + cur_node.warnIfPossible( + "kid " + QUtil::int_to_string(i) + + " (from 0) is direct; converting to indirect"); kid = makeIndirectObject(kid); kids.setArrayItem(i, kid); } else if (seen.count(kid.getObjGen())) { // Make a copy of the page. This does the same as // shallowCopyPage in QPDFPageObjectHelper. QTC::TC("qpdf", "QPDF resolve duplicated page object"); + cur_node.warnIfPossible( + "kid " + QUtil::int_to_string(i) + + " (from 0) appears more than once in the pages tree;" + " creating a new page object as a copy"); kid = makeIndirectObject(QPDFObjectHandle(kid).shallowCopy()); kids.setArrayItem(i, kid); } |