Class PdfDocumentEvent


  • public class PdfDocumentEvent
    extends Event
    Event dispatched by PdfDocument.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private PdfDocument document
      The PdfDocument associated with this event.
      static java.lang.String END_PAGE
      Dispatched before page is flushed to a document.
      static java.lang.String INSERT_PAGE
      Dispatched after page is inserted/added into a document.
      protected PdfPage page
      The PdfPage associated with this event.
      static java.lang.String REMOVE_PAGE
      Dispatched after page is removed from a document.
      static java.lang.String START_PAGE
      Dispatched after page is created.
      • Fields inherited from class com.itextpdf.kernel.events.Event

        type
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PdfDocument getDocument()
      Returns the PdfDocument associated with this event.
      PdfPage getPage()
      Returns the PdfPage associated with this event.
      • Methods inherited from class com.itextpdf.kernel.events.Event

        getType
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • START_PAGE

        public static final java.lang.String START_PAGE
        Dispatched after page is created.
        See Also:
        Constant Field Values
      • INSERT_PAGE

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

        public static final java.lang.String REMOVE_PAGE
        Dispatched after page is removed from a document.
        See Also:
        Constant Field Values
      • END_PAGE

        public static final java.lang.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:
        Constant Field Values
      • page

        protected PdfPage page
        The PdfPage associated with this event.
      • document

        private PdfDocument document
        The PdfDocument associated with this event.
    • Constructor Detail

      • PdfDocumentEvent

        public PdfDocumentEvent​(java.lang.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​(java.lang.String type,
                                PdfPage page)
        Creates a PdfDocumentEvent.
        Parameters:
        type - type of the event that fired this event
        page - page that fired this event
    • Method Detail

      • 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