Package org.xhtmlrenderer.pdf
Interface PDFCreationListener
-
- All Known Implementing Classes:
DefaultPDFCreationListener
public interface PDFCreationListener
Callback listener for PDF creation. To use this, callITextRenderer.setListener(PDFCreationListener)
. Note that with a handle on the ITextRenderer instance (provided in the callback arguments) you can access thePdfWriter
instance being used to create the document, usingITextRenderer.getOutputDevice()
, then callingITextOutputDevice.getWriter()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onClose(ITextRenderer renderer)
Called immediately before the iText Document instance is closed, e.g.void
preOpen(ITextRenderer iTextRenderer)
Called immediately after the iText Document instance is created but before the call toDocument.open()
is called.
-
-
-
Method Detail
-
preOpen
void preOpen(ITextRenderer iTextRenderer)
Called 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.- Parameters:
iTextRenderer
- the renderer preparing the document
-
onClose
void onClose(ITextRenderer renderer)
Called immediately before the iText Document instance is closed, e.g. beforeDocument.close()
is called.- Parameters:
renderer
- the iTextRenderer preparing the document
-
-