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