diff options
Diffstat (limited to 'pdf/xpdf/Catalog.cc')
-rw-r--r-- | pdf/xpdf/Catalog.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pdf/xpdf/Catalog.cc b/pdf/xpdf/Catalog.cc index fded0be..ea968ee 100644 --- a/pdf/xpdf/Catalog.cc +++ b/pdf/xpdf/Catalog.cc @@ -26,7 +26,7 @@ Catalog::Catalog(Object *catDict) { Object pagesDict; - Object obj; + Object obj, obj2; int i; ok = gTrue; @@ -74,6 +74,16 @@ Catalog::Catalog(Object *catDict) { nameTree.initNull(); obj.free(); + // read base URI + baseURI = NULL; + if (catDict->dictLookup("URI", &obj)->isDict()) { + if (obj.dictLookup("Base", &obj2)->isString()) { + baseURI = obj2.getString()->copy(); + } + obj2.free(); + } + obj.free(); + return; err3: @@ -99,6 +109,9 @@ Catalog::~Catalog() { } dests.free(); nameTree.free(); + if (baseURI) { + delete baseURI; + } } int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) { |