1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
22 //------------------------------------------------------------------------
24 //------------------------------------------------------------------------
30 Catalog(Object *catDict);
36 GBool isOk() { return ok; }
38 // Get number of pages.
39 int getNumPages() { return numPages; }
42 Page *getPage(int i) { return pages[i-1]; }
44 // Return base URI, or NULL if none.
45 GString *getBaseURI() { return baseURI; }
47 // Find a page, given its object ID. Returns page number, or 0 if
49 int findPage(int num, int gen);
51 // Find a named destination. Returns the link destination, or
52 // NULL if <name> is not a destination.
53 LinkDest *findDest(GString *name);
57 Page **pages; // array of pages
58 Ref *pageRefs; // object ID for each page
59 int numPages; // number of pages
60 Object dests; // named destination dictionary
61 Object nameTree; // name tree
62 GString *baseURI; // base URI for URI-type links
63 GBool ok; // true if catalog is valid
65 int readPageTree(Dict *pages, PageAttrs *attrs, int start);
66 Object *findDestInTree(Object *tree, GString *name, Object *obj);