|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines run-time events that occur when page is printed. By handling this events, the page contents can be pre-processed before it is actually sent to printer.
Method Summary | |
void |
afterPrintingOnGraphics(Graphics g,
int pageNum,
PdfPage pdfPage)
Called by the print methods in PdfPrinter after a page
is printed to the printer's graphics object representing the
page. |
void |
beforePrintingOnGraphics(Graphics g,
int pageNum,
PdfPage pdfPage)
Called by the print methods in PdfPrinter before a page
is printed to the printer's graphics object representing the
page. |
boolean |
cancelPrinting(int numOfPrintedPages,
int totalPagesIssued)
Called by the print methods in PdfPrinter after a page
is printed and returns whether rest of the print job needs to be
cancelled. |
void |
printingOnGraphics(int printingPageNum,
int pageCount)
Called by the print methods in PdfPrinter when a page
is being printed to the printer's graphics object for the page. |
Method Detail |
public void beforePrintingOnGraphics(Graphics g, int pageNum, PdfPage pdfPage)
PdfPrinter
before a page
is printed to the printer's graphics object representing the
page. Use this method to write to the graphics object before
the page contents are actually printed. Content written by this
event will be overlaid by actual content from the page.
g
- printer graphics object representing the pagepageNum
- contents of the pagepdfPage
- PdfPage object of the pagepublic void printingOnGraphics(int printingPageNum, int pageCount)
PdfPrinter
when a page
is being printed to the printer's graphics object for the page.
Use this method to keep track of the page that is being printed
and the total count of the pages that will be sent to the
printer.
printingPageNum
- number of the page that is being renderedpageCount
- total number of pages that will be sent to the
printer for printingpublic void afterPrintingOnGraphics(Graphics g, int pageNum, PdfPage pdfPage)
PdfPrinter
after a page
is printed to the printer's graphics object representing the
page. Use this method to write to the graphics object after
page contents have been printed. Content written by this event
will overlay actual content from the page.
g
- printer graphics object representing the pagepageNum
- number of the pagepdfPage
- PdfPage object of the pagepublic boolean cancelPrinting(int numOfPrintedPages, int totalPagesIssued)
PdfPrinter
after a page
is printed and returns whether rest of the print job needs to be
cancelled. Return true
to cancel the print job.
Return false
to continue the print job without any
change. Also, use this method to keep track of the number of pages
that have been printed and the total number of pages in the print
job.
numOfPrintedPages
- number of pages that have been printedtotalPagesIssued
- total number of pages in the print job
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |