Commit ba2bae4accae4fa1f58bee82190fb7575aceaf72

Authored by Jay Berkenbilt
1 parent bd72ec98

Use 1.2 as the version if we can't read it from the header

The code was using 1.0, but we use /FlateDecode, which didn't appear
until 1.2.
Showing 1 changed file with 3 additions and 1 deletions
libqpdf/QPDF.cc
... ... @@ -239,7 +239,9 @@ QPDF::parse(char const* password)
239 239 QTC::TC("qpdf", "QPDF not a pdf file");
240 240 warn(QPDFExc(qpdf_e_damaged_pdf, this->file->getName(),
241 241 "", 0, "can't find PDF header"));
242   - this->pdf_version = "1.0";
  242 + // QPDFWriter writes files that usually require at least
  243 + // version 1.2 for /FlateDecode
  244 + this->pdf_version = "1.2";
243 245 }
244 246 if (atof(this->pdf_version.c_str()) < 1.2)
245 247 {
... ...