diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-07-12 18:14:31 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-08-01 14:29:14 +0200 |
commit | ff69773b35480de41f86f410a120524c4d57d5c0 (patch) | |
tree | 59b203bea889f5d451554991c85c50ab966e2cbe /libqpdf | |
parent | 9dea7d308069eeb5af3edd44198efa3d80ac83bf (diff) | |
download | qpdf-ff69773b35480de41f86f410a120524c4d57d5c0.tar.zst |
Fix warnings in QPDF::getAllPagesInternal
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF_pages.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index 90d5a09f..a1bede25 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -107,10 +107,7 @@ QPDF::getAllPagesInternal( } visited.insert(cur_node_og); if (!cur_node.isDictionaryOfType("/Pages")) { - warn( - qpdf_e_damaged_pdf, - "page tree node", - m->file->getLastOffset(), + cur_node.warnIfPossible( "/Type key should be /Pages but is not; overriding"); cur_node.replaceKey("/Type", "/Pages"_qpdf); } @@ -140,10 +137,7 @@ QPDF::getAllPagesInternal( kids.setArrayItem(i, kid); } if (!kid.isDictionaryOfType("/Page")) { - warn( - qpdf_e_damaged_pdf, - "page tree node", - this->m->file->getLastOffset(), + kid.warnIfPossible( "/Type key should be /Page but is not; overriding"); kid.replaceKey("/Type", "/Page"_qpdf); } |