Package com.openhtmltopdf.pdfboxout
Interface PDFCreationListener
public interface PDFCreationListener
Callback listener for PDF creation. To use this, call
PdfBoxRenderer.setListener(PDFCreationListener)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
preOpen
Called immediately after the PDF Document instance is created before the content is written.- Parameters:
pdfBoxRenderer
- the renderer preparing the document
-
preWrite
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
Called immediately before the Pdf Document instance is closed- Parameters:
renderer
- the iTextRenderer preparing the document
-