mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Fix exit code when an input other than the primary input generates warnings
This commit is contained in:
parent
0046de0852
commit
94e6323206
@ -477,6 +477,12 @@ QPDFJob::createQPDF()
|
||||
}
|
||||
handleUnderOverlay(pdf);
|
||||
handleTransformations(pdf);
|
||||
|
||||
for (auto& foreign: page_heap) {
|
||||
if (foreign->anyWarnings()) {
|
||||
m->warnings = true;
|
||||
}
|
||||
}
|
||||
return pdf_sp;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ $td->runtest("handle page no with contents",
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("handle page with missing MediaBox",
|
||||
{$td->COMMAND => "qpdf --static-id --empty --pages page-no-content.pdf -- out.pdf"},
|
||||
{$td->FILE => "page-missing-mediabox.out", $td->EXIT_STATUS => 0},
|
||||
{$td->FILE => "page-missing-mediabox.out", $td->EXIT_STATUS => 3},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
$td->runtest("check output",
|
||||
{$td->FILE => "out.pdf"},
|
||||
|
@ -1 +1,2 @@
|
||||
WARNING: page-no-content.pdf, object 4 0 at offset 288: kid 1 (from 0) MediaBox is undefined; setting to letter / ANSI A
|
||||
qpdf: operation succeeded with warnings; resulting file may have some problems
|
||||
|
Loading…
Reference in New Issue
Block a user