Package com.itextpdf.kernel.events
Class PdfDocumentEvent
java.lang.Object
com.itextpdf.kernel.events.Event
com.itextpdf.kernel.events.PdfDocumentEvent
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 page is created. -
Constructor Summary
ConstructorDescriptionPdfDocumentEvent
(String type, PdfDocument document) Creates a PdfDocumentEvent.PdfDocumentEvent
(String type, PdfPage page) Creates a PdfDocumentEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the PdfDocument associated with this event.getPage()
Returns the PdfPage associated with this event.
-
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:
-
page
The PdfPage associated with this event.
-
-
Constructor Details
-
PdfDocumentEvent
Creates a PdfDocumentEvent.- Parameters:
-
type
- type of the event that fired this event -
document
- document 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
-
getDocument
Returns the PdfDocument associated with this event.- Returns:
- the PdfDocument associated with this event
-
getPage
Returns the PdfPage associated with this event. Warning: this can be null.- Returns:
- the PdfPage associated with this event
-