Class PdfDocumentEvent

java.lang.Object
com.itextpdf.kernel.events.Event
com.itextpdf.kernel.events.PdfDocumentEvent

public class PdfDocumentEvent extends Event
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:
    • page

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

    • PdfDocumentEvent

      public PdfDocumentEvent (String type, PdfDocument document)
      Creates a PdfDocumentEvent.
      Parameters:
      type - type of the event that fired this event
      document - document 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

    • getDocument

      public PdfDocument getDocument()
      Returns the PdfDocument associated with this event.
      Returns:
      the PdfDocument associated with this event
    • getPage

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