1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
28 //------------------------------------------------------------------------
30 //------------------------------------------------------------------------
35 PDFDoc(BaseFile file, GString *fileName1);
38 // Was PDF document successfully opened?
39 GBool isOk() { return ok; }
42 GString *getFileName() { return fileName; }
45 Catalog *getCatalog() { return catalog; }
47 // Get page parameters.
48 double getPageWidth(int page)
49 { return catalog->getPage(page)->getWidth(); }
50 double getPageHeight(int page)
51 { return catalog->getPage(page)->getHeight(); }
52 int getPageRotate(int page)
53 { return catalog->getPage(page)->getRotate(); }
55 // Get number of pages.
56 int getNumPages() { return catalog->getNumPages(); }
59 void displayPage(OutputDev *out, int page, int zoom, int rotate,
62 // Display a range of pages.
63 void displayPages(OutputDev *out, int firstPage, int lastPage,
64 int zoom, int rotate);
66 // Find a page, given its object ID. Returns page number, or 0 if
68 int findPage(int num, int gen) { return catalog->findPage(num, gen); }
70 // If point <x>,<y> is in a link, return the associated action;
72 LinkAction *findLink(double x, double y) { return links->find(x, y); }
74 // Return true if <x>,<y> is in a link.
75 GBool onLink(double x, double y) { return links->onLink(x, y); }
77 // Find a named destination. Returns the link destination, or
78 // NULL if <name> is not a destination.
79 LinkDest *findDest(GString *name)
80 { return catalog->findDest(name); }
82 // Is the file encrypted?
83 GBool isEncrypted() { return xref->isEncrypted(); }
85 // Are printing and copying allowed? If not, print an error message.
86 GBool okToPrint() { return xref->okToPrint(); }
87 GBool okToCopy() { return xref->okToCopy(); }
89 // Return the document's Info dictionary (if any).
90 Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
92 // Save this file with another name.
93 GBool saveAs(GString *name);
97 void getLinks(int page);