diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 15:24:43 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-07-29 18:19:04 +0200 |
commit | ba2bae4accae4fa1f58bee82190fb7575aceaf72 (patch) | |
tree | 39a277b868c6e3dc457e5c176172c9840ee9870f | |
parent | bd72ec98efd86522c3d0b4672472bf6cdafad3ce (diff) | |
download | qpdf-ba2bae4accae4fa1f58bee82190fb7575aceaf72.tar.zst |
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.
-rw-r--r-- | libqpdf/QPDF.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index d82813d0..16641247 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -239,7 +239,9 @@ QPDF::parse(char const* password) QTC::TC("qpdf", "QPDF not a pdf file"); warn(QPDFExc(qpdf_e_damaged_pdf, this->file->getName(), "", 0, "can't find PDF header")); - this->pdf_version = "1.0"; + // QPDFWriter writes files that usually require at least + // version 1.2 for /FlateDecode + this->pdf_version = "1.2"; } if (atof(this->pdf_version.c_str()) < 1.2) { |