1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
28 //------------------------------------------------------------------------
30 //------------------------------------------------------------------------
35 PDFDoc(GString *fileName1);
36 PDFDoc(BaseStream *str);
39 // Was PDF document successfully opened?
40 GBool isOk() { return ok; }
43 GString *getFileName() { return fileName; }
46 Catalog *getCatalog() { return catalog; }
48 // Get page parameters.
49 double getPageWidth(int page)
50 { return catalog->getPage(page)->getWidth(); }
51 double getPageHeight(int page)
52 { return catalog->getPage(page)->getHeight(); }
53 int getPageRotate(int page)
54 { return catalog->getPage(page)->getRotate(); }
56 // Get number of pages.
57 int getNumPages() { return catalog->getNumPages(); }
60 void displayPage(OutputDev *out, int page, int zoom, int rotate,
63 // Display a range of pages.
64 void displayPages(OutputDev *out, int firstPage, int lastPage,
65 int zoom, int rotate);
67 // Find a page, given its object ID. Returns page number, or 0 if
69 int findPage(int num, int gen) { return catalog->findPage(num, gen); }
71 // If point <x>,<y> is in a link, return the associated action;
73 LinkAction *findLink(double x, double y) { return links->find(x, y); }
75 // Return true if <x>,<y> is in a link.
76 GBool onLink(double x, double y) { return links->onLink(x, y); }
78 // Find a named destination. Returns the link destination, or
79 // NULL if <name> is not a destination.
80 LinkDest *findDest(GString *name)
81 { return catalog->findDest(name); }
83 // Is the file encrypted?
84 GBool isEncrypted() { return xref->isEncrypted(); }
86 // Are printing and copying allowed? If not, print an error message.
87 GBool okToPrint() { return xref->okToPrint(); }
88 GBool okToCopy() { return xref->okToCopy(); }
90 // Return the document's Info dictionary (if any).
91 Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
93 // Save this file with another name.
94 GBool saveAs(GString *name);
100 void getLinks(int page);