1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
27 //------------------------------------------------------------------------
29 //------------------------------------------------------------------------
34 PDFDoc(Stream *str1, GString *fileName1);
37 // Was PDF document successfully opened?
38 GBool isOk() { return ok; }
41 GString *getFileName() { return fileName; }
44 Catalog *getCatalog() { return catalog; }
46 // Get page parameters.
47 double getPageWidth(int page)
48 { return catalog->getPage(page)->getWidth(); }
49 double getPageHeight(int page)
50 { return catalog->getPage(page)->getHeight(); }
51 int getPageRotate(int page)
52 { return catalog->getPage(page)->getRotate(); }
54 // Get number of pages.
55 int getNumPages() { return catalog->getNumPages(); }
58 void displayPage(OutputDev *out, int page, int zoom, int rotate,
61 // Display a range of pages.
62 void displayPages(OutputDev *out, int firstPage, int lastPage,
63 int zoom, int rotate);
65 // Find a page, given its object ID. Returns page number, or 0 if
67 int findPage(int num, int gen) { return catalog->findPage(num, gen); }
69 // If point <x>,<y> is in a link, return the associated action;
71 LinkAction *findLink(double x, double y) { return links->find(x, y); }
73 // Return true if <x>,<y> is in a link.
74 GBool onLink(double x, double y) { return links->onLink(x, y); }
76 // Find a named destination. Returns the link destination, or
77 // NULL if <name> is not a destination.
78 LinkDest *findDest(GString *name)
79 { return catalog->findDest(name); }
81 // Is the file encrypted?
82 GBool isEncrypted() { return xref->isEncrypted(); }
84 // Are printing and copying allowed? If not, print an error message.
85 GBool okToPrint() { return xref->okToPrint(); }
86 GBool okToCopy() { return xref->okToCopy(); }
88 // Return the document's Info dictionary (if any).
89 Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
91 // Save this file with another name.
92 GBool saveAs(GString *name);
96 void getLinks(int page);