mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 11:58:25 +00:00
Fix warnings in QPDF::getAllPagesInternal
This commit is contained in:
parent
9dea7d3080
commit
ff69773b35
@ -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);
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
WARNING: no-pages-types.pdf (page tree node, offset 307): /Type key should be /Pages but is not; overriding
|
||||
WARNING: no-pages-types.pdf (page tree node, offset 307): /Type key should be /Page but is not; overriding
|
||||
WARNING: no-pages-types.pdf, object 2 0 at offset 73: /Type key should be /Pages but is not; overriding
|
||||
WARNING: no-pages-types.pdf, object 3 0 at offset 145: /Type key should be /Page but is not; overriding
|
||||
qpdf: operation succeeded with warnings; resulting file may have some problems
|
||||
|
@ -2,6 +2,6 @@ checking no-pages-types.pdf
|
||||
PDF Version: 1.3
|
||||
File is not encrypted
|
||||
File is not linearized
|
||||
WARNING: no-pages-types.pdf (page tree node, offset 135): /Type key should be /Pages but is not; overriding
|
||||
WARNING: no-pages-types.pdf (page tree node, offset 307): /Type key should be /Page but is not; overriding
|
||||
WARNING: no-pages-types.pdf, object 2 0 at offset 73: /Type key should be /Pages but is not; overriding
|
||||
WARNING: no-pages-types.pdf, object 3 0 at offset 145: /Type key should be /Page but is not; overriding
|
||||
qpdf: operation succeeded with warnings
|
||||
|
Loading…
x
Reference in New Issue
Block a user