X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FCatalog.h;h=c38f10985008d8ec0ec4587ff99075561065e3ac;hb=eb361a0f099d689011066b71a9d5e5d9fd94b913;hp=b0f314323383787890e65efd60af1d52cbf3cbe5;hpb=fc554a43712b76d16b41ec77dd311b4a78b1ef6b;p=swftools.git diff --git a/pdf2swf/xpdf/Catalog.h b/pdf2swf/xpdf/Catalog.h index b0f3143..c38f109 100644 --- a/pdf2swf/xpdf/Catalog.h +++ b/pdf2swf/xpdf/Catalog.h @@ -2,17 +2,20 @@ // // Catalog.h // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== #ifndef CATALOG_H #define CATALOG_H -#ifdef __GNUC__ +#include + +#ifdef USE_GCC_PRAGMAS #pragma interface #endif +class XRef; class Object; class Page; class PageAttrs; @@ -27,7 +30,7 @@ class Catalog { public: // Constructor. - Catalog(Object *catDict); + Catalog(XRef *xrefA); // Destructor. ~Catalog(); @@ -47,6 +50,13 @@ public: // Return base URI, or NULL if none. GString *getBaseURI() { return baseURI; } + // Return the contents of the metadata stream, or NULL if there is + // no metadata. + GString *readMetadata(); + + // Return the structure tree root object. + Object *getStructTreeRoot() { return &structTreeRoot; } + // Find a page, given its object ID. Returns page number, or 0 if // not found. int findPage(int num, int gen); @@ -55,8 +65,13 @@ public: // NULL if is not a destination. LinkDest *findDest(GString *name); + Object *getOutline() { return &outline; } + + Object *getAcroForm() { return &acroForm; } + private: + XRef *xref; // the xref table for this PDF file Page **pages; // array of pages Ref *pageRefs; // object ID for each page int numPages; // number of pages @@ -64,6 +79,10 @@ private: Object dests; // named destination dictionary Object nameTree; // name tree GString *baseURI; // base URI for URI-type links + Object metadata; // metadata stream + Object structTreeRoot; // structure tree root dictionary + Object outline; // outline dictionary + Object acroForm; // AcroForm dictionary GBool ok; // true if catalog is valid int readPageTree(Dict *pages, PageAttrs *attrs, int start);