Package com.itextpdf.kernel.pdf.event
Class PdfDocumentEvent
java.lang.Object
com.itextpdf.kernel.pdf.event.AbstractPdfDocumentEvent
com.itextpdf.kernel.pdf.event.PdfDocumentEvent
- All Implemented Interfaces:
-
IEvent
Event dispatched by PdfDocument.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Dispatched before page is flushed to a document.static final String
Dispatched after page is inserted/added into a document.protected PdfPage
The PdfPage associated with this event.static final String
Dispatched after page is removed from a document.static final String
Dispatched after writer is flushed to a document.static final String
Dispatched after page is created.static final String
Dispatched before writer is closed.Fields inherited from class com.itextpdf.kernel.pdf.event.AbstractPdfDocumentEvent
type
-
Constructor Summary
ConstructorDescriptionPdfDocumentEvent
(String type) Creates a PdfDocumentEvent.PdfDocumentEvent
(String type, PdfPage page) Creates a PdfDocumentEvent. -
Method Summary
Methods inherited from class com.itextpdf.kernel.pdf.event.AbstractPdfDocumentEvent
getDocument, getType, setDocument
-
Field Details
-
START_PAGE
Dispatched after page is created.- See Also:
-
INSERT_PAGE
Dispatched after page is inserted/added into a document.- See Also:
-
REMOVE_PAGE
Dispatched after page is removed from a document.- See Also:
-
END_PAGE
Dispatched before page is flushed to a document. This event isn't necessarily dispatched when a successive page has been created. Keep it in mind when using with highlevel iText API.- See Also:
-
START_WRITER_CLOSING
Dispatched before writer is closed.- See Also:
-
START_DOCUMENT_CLOSING
Dispatched after writer is flushed to a document.- See Also:
-
page
The PdfPage associated with this event.
-
-
Constructor Details
-
PdfDocumentEvent
Creates a PdfDocumentEvent.- Parameters:
-
type
- type of the event that fired this event
-
PdfDocumentEvent
Creates a PdfDocumentEvent.- Parameters:
-
type
- type of the event that fired this event -
page
- page that fired this event
-
-
Method Details
-
getPage
Returns the PdfPage associated with this event. Warning: this can be null.- Returns:
- the PdfPage associated with this event
-