]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/PDFDoc.h
e679db9795edec920d234882c4ce902da48b732f
1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
29 //------------------------------------------------------------------------
31 //------------------------------------------------------------------------
36 PDFDoc(GString
*fileName1
, GString
*userPassword
= NULL
);
37 PDFDoc(BaseStream
*str
, GString
*userPassword
= NULL
);
40 // Was PDF document successfully opened?
41 GBool
isOk() { return ok
; }
44 GString
*getFileName() { return fileName
; }
47 Catalog
*getCatalog() { return catalog
; }
50 BaseStream
*getBaseStream() { return str
; }
52 // Get page parameters.
53 double getPageWidth(int page
)
54 { return catalog
->getPage(page
)->getWidth(); }
55 double getPageHeight(int page
)
56 { return catalog
->getPage(page
)->getHeight(); }
57 int getPageRotate(int page
)
58 { return catalog
->getPage(page
)->getRotate(); }
60 // Get number of pages.
61 int getNumPages() { return catalog
->getNumPages(); }
64 void displayPage(OutputDev
*out
, int page
, double zoom
,
65 int rotate
, GBool doLinks
);
67 // Display a range of pages.
68 void displayPages(OutputDev
*out
, int firstPage
, int lastPage
,
69 int zoom
, int rotate
, GBool doLinks
);
71 // Find a page, given its object ID. Returns page number, or 0 if
73 int findPage(int num
, int gen
) { return catalog
->findPage(num
, gen
); }
75 // If point <x>,<y> is in a link, return the associated action;
77 LinkAction
*findLink(double x
, double y
) { return links
->find(x
, y
); }
79 // Return true if <x>,<y> is in a link.
80 GBool
onLink(double x
, double y
) { return links
->onLink(x
, y
); }
82 // Find a named destination. Returns the link destination, or
83 // NULL if <name> is not a destination.
84 LinkDest
*findDest(GString
*name
)
85 { return catalog
->findDest(name
); }
87 // Is the file encrypted?
88 GBool
isEncrypted() { return xref
->isEncrypted(); }
90 // Check various permissions.
91 GBool
okToPrint() { return xref
->okToPrint(); }
92 GBool
okToChange() { return xref
->okToChange(); }
93 GBool
okToCopy() { return xref
->okToCopy(); }
94 GBool
okToAddNotes() { return xref
->okToAddNotes(); }
96 // Is this document linearized?
99 // Return the document's Info dictionary (if any).
100 Object
*getDocInfo(Object
*obj
) { return xref
->getDocInfo(obj
); }
102 // Return the PDF version specified by the file.
103 double getPDFVersion() { return pdfVersion
; }
105 // Save this file with another name.
106 GBool
saveAs(GString
*name
);
110 GBool
setup(GString
*userPassword
);
112 void getLinks(Page
*page
);