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