Class PdfDocumentEvent

java.lang.Object
com.itextpdf.kernel.pdf.event.AbstractPdfDocumentEvent
com.itextpdf.kernel.pdf.event.PdfDocumentEvent
All Implemented Interfaces:
IEvent

public class PdfDocumentEvent extends AbstractPdfDocumentEvent
Event dispatched by PdfDocument.
  • Field Details

    • START_PAGE

      public static final String START_PAGE
      Dispatched after page is created.
      See Also:
    • INSERT_PAGE

      public static final String INSERT_PAGE
      Dispatched after page is inserted/added into a document.
      See Also:
    • REMOVE_PAGE

      public static final String REMOVE_PAGE
      Dispatched after page is removed from a document.
      See Also:
    • END_PAGE

      public static final String 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

      public static final String START_WRITER_CLOSING
      Dispatched before writer is closed.
      See Also:
    • START_DOCUMENT_CLOSING

      public static final String START_DOCUMENT_CLOSING
      Dispatched after writer is flushed to a document.
      See Also:
    • page

      protected PdfPage page
      The PdfPage associated with this event.
  • Constructor Details

    • PdfDocumentEvent

      public PdfDocumentEvent (String type)
      Creates a PdfDocumentEvent.
      Parameters:
      type - type of the event that fired this event
    • PdfDocumentEvent

      public PdfDocumentEvent (String type, PdfPage page)
      Creates a PdfDocumentEvent.
      Parameters:
      type - type of the event that fired this event
      page - page that fired this event
  • Method Details

    • getPage

      public PdfPage getPage()
      Returns the PdfPage associated with this event. Warning: this can be null.
      Returns:
      the PdfPage associated with this event