2
//========================================================================
6
// Copyright 1996-2002 Glyph & Cog, LLC
8
//========================================================================
15
#ifdef USE_GCC_PRAGMAS
26
//------------------------------------------------------------------------
28
//------------------------------------------------------------------------
40
GBool isOk() { return ok; }
42
// Get number of pages.
43
int getNumPages() { return numPages; }
46
Page *getPage(int i) { return pages[i-1]; }
48
// Get the reference for a page object.
49
Ref *getPageRef(int i) { return &pageRefs[i-1]; }
51
// Return base URI, or NULL if none.
52
GString *getBaseURI() { return baseURI; }
54
// Return the contents of the metadata stream, or NULL if there is
56
GString *readMetadata();
58
// Return the structure tree root object.
59
Object *getStructTreeRoot() { return &structTreeRoot; }
61
// Find a page, given its object ID. Returns page number, or 0 if
63
int findPage(int num, int gen);
65
// Find a named destination. Returns the link destination, or
66
// NULL if <name> is not a destination.
67
LinkDest *findDest(GString *name);
69
Object *getOutline() { return &outline; }
73
XRef *xref; // the xref table for this PDF file
74
Page **pages; // array of pages
75
Ref *pageRefs; // object ID for each page
76
int numPages; // number of pages
77
int pagesSize; // size of pages array
78
Object dests; // named destination dictionary
79
Object nameTree; // name tree
80
GString *baseURI; // base URI for URI-type links
81
Object metadata; // metadata stream
82
Object structTreeRoot; // structure tree root dictionary
83
Object outline; // outline dictionary
84
GBool ok; // true if catalog is valid
86
int readPageTree(Dict *pages, PageAttrs *attrs, int start);
87
Object *findDestInTree(Object *tree, GString *name, Object *obj);