1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
22 //------------------------------------------------------------------------
24 //------------------------------------------------------------------------
35 // Constructor. Read xref table from stream.
36 XRef(BaseStream *str);
41 // Is xref table valid?
42 GBool isOk() { return ok; }
44 // Is the file encrypted?
45 GBool isEncrypted() { return gFalse; }
47 // Are printing and copying allowed? If not, print an error message.
51 // Get catalog object.
52 Object *getCatalog(Object *obj) { return fetch(rootNum, rootGen, obj); }
54 // Fetch an indirect reference.
55 Object *fetch(int num, int gen, Object *obj);
57 // Return the document's Info dictionary (if any).
58 Object *getDocInfo(Object *obj);
62 BaseStream *str; // input stream
63 int start; // offset in file (to allow for garbage
64 // at beginning of file)
65 XRefEntry *entries; // xref entries
66 int size; // size of <entries> array
67 int rootNum, rootGen; // catalog dict
68 GBool ok; // true if xref table is valid
69 Object trailerDict; // trailer dictionary
72 GBool readXRef(int *pos);
73 GBool constructXRef();
74 GBool checkEncrypted();
77 //------------------------------------------------------------------------
78 // The global xref table
79 //------------------------------------------------------------------------