//
// Catalog.h
//
-// Copyright 1996 Derek B. Noonburg
+// Copyright 1996-2002 Glyph & Cog, LLC
//
//========================================================================
#pragma interface
#endif
+class XRef;
class Object;
class Page;
class PageAttrs;
public:
// Constructor.
- Catalog(Object *catDict);
+ Catalog(XRef *xrefA, GBool printCommands = gFalse);
// Destructor.
~Catalog();
// 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);
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
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
GBool ok; // true if catalog is valid
- int readPageTree(Dict *pages, PageAttrs *attrs, int start);
+ int readPageTree(Dict *pages, PageAttrs *attrs, int start,
+ GBool printCommands);
Object *findDestInTree(Object *tree, GString *name, Object *obj);
};