|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.qoppa.pdfPrint.PDFPrint
The PDFPrint class provides methods to print a pdf document.
| Field Summary |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
PDFPrint(InputStream inStream,
IPasswordHandler pwdHandler)
Loads a PDF document from an InputStream. |
|
PDFPrint(String fileName,
IPasswordHandler pwdHandler)
Loads a PDF document from a file. |
|
PDFPrint(URL url,
IPasswordHandler pwdHandler)
Loads a PDF document from a URL. |
|
| Method Summary | |
int |
getNumberOfPages()
Returns the number of pages in this document. |
Pageable |
getPageable(PrinterJob pJob)
Returns an object that implements Pageable for this PDF document. |
PageFormat |
getPageFormat(int pageIndex)
Returns a PageFormat object for the given page. |
PrintSettings |
getPrintSettings()
Returns the PrintSettings that will be used when printing the document. |
static String |
getVersion()
Returns version string for jPDFPrint. |
int |
print(Graphics graphics,
PageFormat pageFormat,
int pageIndex)
Prints the page. |
void |
print(PrintSettings printSettings)
Prints this PDF document. |
void |
print(String printerName,
PrintSettings printSettings)
Prints this PDF document to the specified printer, by name. |
static void |
print(String fileName,
PrintSettings printSettings,
IPasswordHandler pwdHandler)
Convenience method to print a PDF document from a file. |
static void |
print(String fileName,
String printerName,
PrintSettings printSettings,
IPasswordHandler pwdHandler)
Convenience method to print a PDF document from a file to a named printer. |
static void |
setAppletKey(String key,
Applet applet)
Method to unlock the production version of the library. |
static void |
setKey(String key)
Method to unlock the production version of the library. |
void |
setPrintSettings(PrintSettings printSettings)
Set the PrintSettings used when printing this document while using the class as a Printable (rather than calling one of the print methods). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PDFPrint(String fileName,
IPasswordHandler pwdHandler)
throws PDFException
fileName - Name of the PDF file.pwdHandler - Interface to provide a password, if necessary.
public PDFPrint(InputStream inStream,
IPasswordHandler pwdHandler)
throws PDFException
inStream - InputStream to read the PDF document.pwdHandler - Interface to provide a password, if necessary.
public PDFPrint(URL url,
IPasswordHandler pwdHandler)
throws PDFException
url - Location of the PDF document.pwdHandler - Interface to provide a password, if necessary.| Method Detail |
public static void print(String fileName,
PrintSettings printSettings,
IPasswordHandler pwdHandler)
throws PrinterException,
PDFException
fileName - Name of the PDF file.printSettings - Print job settings. Use this object to tell
the library how to print the document. The library uses default
settings when null is used.pwdHandler - Interface to provide a password, if necessary.
PrinterException
PDFException
public static void print(String fileName,
String printerName,
PrintSettings printSettings,
IPasswordHandler pwdHandler)
throws PrinterException,
PDFException
fileName - Name of the PDF file.printerName - Name of the printer to print to. If null, prints to
the default printer.printSettings - Print job settings. Use this object to tell
the library how to print the document. The library uses default
settings when null is used.pwdHandler - Interface to provide a password, if necessary.
PrinterException
PDFException
public void print(PrintSettings printSettings)
throws PDFPermissionException,
PrinterException
printSettings - Print job settings. Use this object to tell
the library how to print the document. If null, the library will
print using default settings.
PDFPermissionException
PrinterException
public void print(String printerName,
PrintSettings printSettings)
throws PDFPermissionException,
PrinterException
printSettings - Print job settings. Use this object to tell
the library how to print the document. If null, the library will
print using default settings.printerName - The name of the printer to print to. If this parameter
is set to null, the method will print to the default printer.
PrinterException - This exception is thrown if the printer is not
found or if there is an error while printing.
PDFPermissionExceptionpublic static void setKey(String key)
key - Production key.
public static void setAppletKey(String key,
Applet applet)
key - Production key.public static String getVersion()
public int print(Graphics graphics,
PageFormat pageFormat,
int pageIndex)
throws PrinterException
print in interface PrintablePrinterExceptionpublic PrintSettings getPrintSettings()
public Pageable getPageable(PrinterJob pJob)
pJob - PrinterJob object where the Pageable will be used.
public void setPrintSettings(PrintSettings printSettings)
printSettings - PrintSettings to use when printing.
public PageFormat getPageFormat(int pageIndex)
throws IndexOutOfBoundsException
IndexOutOfBoundsExceptionpublic int getNumberOfPages()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||