mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-22 22:58:33 +00:00
Fix --check-linearization of non-linearized files (fixes #615)
This commit is contained in:
parent
4d507251fe
commit
1925ffd467
@ -1979,7 +1979,12 @@ QPDFJob::doInspection(QPDF& pdf)
|
||||
}
|
||||
if (m->check_linearization)
|
||||
{
|
||||
if (pdf.checkLinearization())
|
||||
if (! pdf.isLinearized())
|
||||
{
|
||||
*(this->m->cout)
|
||||
<< m->infilename << " is not linearized" << std::endl;
|
||||
}
|
||||
else if (pdf.checkLinearization())
|
||||
{
|
||||
*(this->m->cout)
|
||||
<< m->infilename << ": no linearization errors" << std::endl;
|
||||
|
@ -4486,6 +4486,15 @@ $td->runtest("check linearization",
|
||||
$td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
# Test --check-linearization of non-linearized file
|
||||
$n_tests += 1;
|
||||
$td->runtest("check linearization of non-linearized file",
|
||||
{$td->COMMAND => "qpdf --check-linearization minimal.pdf"},
|
||||
{$td->STRING => "minimal.pdf is not linearized\n",
|
||||
$td->EXIT_STATUS => 0},
|
||||
$td->NORMALIZE_NEWLINES);
|
||||
|
||||
|
||||
# Test AES encryption in various ways.
|
||||
$n_tests += 18;
|
||||
$td->runtest("encrypt with AES",
|
||||
|
Loading…
x
Reference in New Issue
Block a user