Commit da0f8e69 authored by Hib Eris's avatar Hib Eris Committed by Albert Astals Cid
Browse files

Parse Outline on demand in PDFDoc

parent d7a69c8c
......@@ -226,11 +226,6 @@ GBool PDFDoc::setup(GooString *ownerPassword, GooString *userPassword) {
return gFalse;
}
#ifndef DISABLE_OUTLINE
// read outline
outline = new Outline(catalog->getOutline(), xref);
#endif
// done
return gTrue;
}
......@@ -907,6 +902,18 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
delete trailerDict;
}
#ifndef DISABLE_OUTLINE
Outline *PDFDoc::getOutline()
{
if (!outline) {
// read outline
outline = new Outline(catalog->getOutline(), xref);
}
return outline;
}
#endif
PDFDoc *PDFDoc::ErrorPDFDoc(int errorCode, GooString *fileNameA)
{
PDFDoc *doc = new PDFDoc();
......
......@@ -170,7 +170,7 @@ public:
#ifndef DISABLE_OUTLINE
// Return the outline object.
Outline *getOutline() { return outline; }
Outline *getOutline();
#endif
// Is the file encrypted?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment