Package com.openhtmltopdf.pdfboxout
Interface PDFCreationListener
-
public interface PDFCreationListener
Callback listener for PDF creation. To use this, callPdfBoxRenderer.setListener(PDFCreationListener)
.
-
-
Method Summary
Modifier and Type Method Description void
onClose(PdfBoxRenderer renderer)
Called immediately before the Pdf Document instance is closedvoid
preOpen(PdfBoxRenderer pdfBoxRenderer)
Called immediately after the PDF Document instance is created before the content is written.void
preWrite(PdfBoxRenderer pdfBoxRenderer, int pageCount)
Called immediately before the pages of the PDF file are about to be written out.
-
-
-
Method Detail
-
preOpen
void preOpen(PdfBoxRenderer pdfBoxRenderer)
Called immediately after the PDF Document instance is created before the content is written.- Parameters:
pdfBoxRenderer
- the renderer preparing the document
-
preWrite
void preWrite(PdfBoxRenderer pdfBoxRenderer, int pageCount)
Called immediately before the pages of the PDF file are about to be written out. This is an opportunity to modify any document metadata that will be used to generate the PDF header fields (the document information dictionary).- Parameters:
pdfBoxRenderer
- the renderer preparing the documentpageCount
- the number of pages that will be written to the PDF document
-
onClose
void onClose(PdfBoxRenderer renderer)
Called immediately before the Pdf Document instance is closed- Parameters:
renderer
- the iTextRenderer preparing the document
-
-