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);
|
visited.insert(cur_node_og);
|
||||||
if (!cur_node.isDictionaryOfType("/Pages")) {
|
if (!cur_node.isDictionaryOfType("/Pages")) {
|
||||||
warn(
|
cur_node.warnIfPossible(
|
||||||
qpdf_e_damaged_pdf,
|
|
||||||
"page tree node",
|
|
||||||
m->file->getLastOffset(),
|
|
||||||
"/Type key should be /Pages but is not; overriding");
|
"/Type key should be /Pages but is not; overriding");
|
||||||
cur_node.replaceKey("/Type", "/Pages"_qpdf);
|
cur_node.replaceKey("/Type", "/Pages"_qpdf);
|
||||||
}
|
}
|
||||||
@ -140,10 +137,7 @@ QPDF::getAllPagesInternal(
|
|||||||
kids.setArrayItem(i, kid);
|
kids.setArrayItem(i, kid);
|
||||||
}
|
}
|
||||||
if (!kid.isDictionaryOfType("/Page")) {
|
if (!kid.isDictionaryOfType("/Page")) {
|
||||||
warn(
|
kid.warnIfPossible(
|
||||||
qpdf_e_damaged_pdf,
|
|
||||||
"page tree node",
|
|
||||||
this->m->file->getLastOffset(),
|
|
||||||
"/Type key should be /Page but is not; overriding");
|
"/Type key should be /Page but is not; overriding");
|
||||||
kid.replaceKey("/Type", "/Page"_qpdf);
|
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, object 2 0 at offset 73: /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 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
|
qpdf: operation succeeded with warnings; resulting file may have some problems
|
||||||
|
@ -2,6 +2,6 @@ checking no-pages-types.pdf
|
|||||||
PDF Version: 1.3
|
PDF Version: 1.3
|
||||||
File is not encrypted
|
File is not encrypted
|
||||||
File is not linearized
|
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, object 2 0 at offset 73: /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 3 0 at offset 145: /Type key should be /Page but is not; overriding
|
||||||
qpdf: operation succeeded with warnings
|
qpdf: operation succeeded with warnings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user