|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.print.PrinterJob com.qoppa.pdfWriter.PDFPrinterJob
Implementation of PrinterJob used to print to a PDF document. This class extends and emulates a standard Java PrinterJob object so that printing code can be reused to output to a PDF file.
Method Summary | |
void |
cancel()
Cancel printing the PDF document. |
PageFormat |
defaultPage()
Returns the default page format for PDFPrinterJob. |
PageFormat |
defaultPage(PageFormat pf)
Clones the PageFormat argument and alters the clone to describe a default page size and orientation. |
int |
getCopies()
Returns the number of copies that will be printed. |
String |
getJobName()
Returns the name of the printer job. |
static PrinterJob |
getPrinterJob()
Creates a new PDFPrinterJob. |
String |
getUserName()
Returns the printer job's user name. |
static String |
getVersion()
Returns the version string for the jPDFWriter library. |
boolean |
isCancelled()
Returns flag indicating whether this job has been cancelled. |
PageFormat |
pageDialog(PageFormat pf)
Displays a dialog to request a page format from the user. |
void |
print()
Initiates printing to the PDF document. |
void |
print(OutputStream outStream)
Initiates printing to the PDF document, then writes the document to an OutputStream. |
void |
print(String outFileName)
Initiates printing to the PDF document, then writes the document to a file. |
boolean |
printDialog()
Shows the printer options dialog. |
PDFDocument |
printToDocument()
Initiates printing to the PDF document, then returns the document to the calling program. |
void |
run()
Internal method. |
void |
setCopies(int copies)
Sets the number of copies to output. |
void |
setJobName(String jobName)
Sets the printer job name. |
static void |
setKey(String key)
Sets product key. |
void |
setPageable(Pageable pageable)
Sets the Pageable object to use when creating the PDF document. |
void |
setPrintable(Printable printable)
Sets the Printable object to use when creating the PDF document. |
void |
setPrintable(Printable printable,
PageFormat pf)
Sets the Printable object and page format to user when creating the PDF document. |
PageFormat |
validatePage(PageFormat pf)
Returns the clone of page with its settings adjusted to be compatible with the current printer of this PrinterJob. |
Methods inherited from class java.awt.print.PrinterJob |
getPrintService, lookupPrintServices, lookupStreamPrintServices, pageDialog, print, printDialog, setPrintService |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void cancel()
public PageFormat defaultPage()
public PageFormat defaultPage(PageFormat pf)
pf
- the PageFormat to be cloned and altered
public int getCopies()
public String getJobName()
public static PrinterJob getPrinterJob()
public String getUserName()
public static String getVersion()
public boolean isCancelled()
public PageFormat pageDialog(PageFormat pf)
pf
- java.awt.print.PageFormat
public void print() throws PrinterException
PrinterException
public void print(OutputStream outStream) throws PrinterException
outStream
- OutputStream to write the PDF document to.
PrinterException
public void print(String outFileName) throws PrinterException
outFileName
- File to write the PDF document to.
Creation date: (4/29/2002 11:00:27 PM)
PrinterException
public PDFDocument printToDocument() throws PrinterException
PrinterException
public boolean printDialog()
public void run()
run
in interface Runnable
public void setCopies(int copies)
copies
- intpublic void setJobName(String jobName)
jobName
- java.lang.Stringpublic void setPageable(Pageable pageable)
pageable
- java.awt.print.Pageablepublic void setPrintable(Printable printable)
printable
- java.awt.print.Printablepublic void setPrintable(Printable printable, PageFormat pf)
printable
- java.awt.print.Printablepublic PageFormat validatePage(PageFormat pf)
pf
- java.awt.print.PageFormat
public static void setKey(String key)
key
- - Product key.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |