aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-31 00:58:19 +0100
committerJay Berkenbilt <ejb@ql.org>2009-10-31 00:58:19 +0100
commit91ce55a4e3c1f29f4710499464b61dc014bb7588 (patch)
tree46dedd0008aa1e7730457f6258d7efa96d714fde /libqpdf
parentfc5ca3b18cae958885b7c451b743624b1ee19c99 (diff)
downloadqpdf-91ce55a4e3c1f29f4710499464b61dc014bb7588.tar.zst
git-svn-id: svn+q:///qpdf/trunk@913 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDF.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 0a017b41..4317bdd0 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -15,7 +15,7 @@
#include <qpdf/QPDF_Null.hh>
#include <qpdf/QPDF_Dictionary.hh>
-std::string QPDF::qpdf_version = "2.1.rc1";
+std::string QPDF::qpdf_version = "2.1";
void
QPDF::InputSource::setLastOffset(off_t offset)
@@ -425,9 +425,9 @@ QPDF::setTrailer(QPDFObjectHandle obj)
void
QPDF::reconstruct_xref(QPDFExc& e)
{
- static PCRE obj_re("^(\\d+) (\\d+) obj\\b");
- static PCRE endobj_re("^endobj\\b");
- static PCRE trailer_re("^trailer\\b");
+ static PCRE obj_re("^\\s*(\\d+)\\s+(\\d+)\\s+obj\\b");
+ static PCRE endobj_re("^\\s*endobj\\b");
+ static PCRE trailer_re("^\\s*trailer\\b");
warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0,
"file is damaged"));
@@ -561,7 +561,7 @@ QPDF::read_xref(off_t xref_offset)
int
QPDF::read_xrefTable(off_t xref_offset)
{
- static PCRE xref_first_re("^(\\d+)\\s+(\\d+)");
+ static PCRE xref_first_re("^\\s*(\\d+)\\s+(\\d+)");
static PCRE xref_entry_re("(?s:(^\\d{10}) (\\d{5}) ([fn])[ \r\n]{2}$)");
std::vector<ObjGen> deleted_items;
@@ -1350,7 +1350,7 @@ int
QPDF::recoverStreamLength(InputSource* input,
int objid, int generation, off_t stream_offset)
{
- static PCRE endobj_re("^endobj\\b");
+ static PCRE endobj_re("^\\s*endobj\\b");
// Try to reconstruct stream length by looking for
// endstream(\r\n?|\n)endobj