java.lang.Object
org.xhtmlrenderer.pdf.DefaultPDFCreationListener
- All Implemented Interfaces:
PDFCreationListener
- Direct Known Subclasses:
XHtmlMetaToPdfInfoAdapter
No-op implementation of a
PDFCreationListener. Override methods as needed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonClose(ITextRenderer renderer) Called immediately before the iText Document instance is closed, e.g. beforeDocument.close()is called.voidpreOpen(ITextRenderer iTextRenderer) Called immediately after the iText Document instance is created but before the call toDocument.open()is called.voidpreWrite(ITextRenderer iTextRenderer, int pageCount) Called immediately before the pages of the PDF file are about to be written out.
-
Constructor Details
-
DefaultPDFCreationListener
public DefaultPDFCreationListener()
-
-
Method Details
-
preOpen
Description copied from interface:PDFCreationListenerCalled immediately after the iText Document instance is created but before the call toDocument.open()is called. At this point you may still modify certain properties of the PDF document header via thePdfWriter; once open() is called, you can't change, e.g. the version. See the iText documentation for what limitations there are at this phase of processing.- Specified by:
preOpenin interfacePDFCreationListener- Parameters:
iTextRenderer- the renderer preparing the document
-
preWrite
Description copied from interface:PDFCreationListenerCalled 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). Document metadata may be accessed through theITextOutputDevicethat is returned byITextRenderer.getOutputDevice().- Specified by:
preWritein interfacePDFCreationListener- Parameters:
iTextRenderer- the renderer preparing the documentpageCount- the number of pages that will be written to the PDF document
-
onClose
Description copied from interface:PDFCreationListenerCalled immediately before the iText Document instance is closed, e.g. beforeDocument.close()is called.- Specified by:
onClosein interfacePDFCreationListener- Parameters:
renderer- the iTextRenderer preparing the document
-