Class PdfDocumentEvent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      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_DOCUMENT_CLOSING
      Dispatched after writer is flushed to a document.
      static java.lang.String START_PAGE
      Dispatched after page is created.
      static java.lang.String START_WRITER_CLOSING
      Dispatched before writer is closed.
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfDocumentEvent​(java.lang.String type)
      Creates a PdfDocumentEvent.
      PdfDocumentEvent​(java.lang.String type, PdfPage page)
      Creates a PdfDocumentEvent.
    • 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
      • START_WRITER_CLOSING

        public static final java.lang.String START_WRITER_CLOSING
        Dispatched before writer is closed.
        See Also:
        Constant Field Values
      • START_DOCUMENT_CLOSING

        public static final java.lang.String START_DOCUMENT_CLOSING
        Dispatched after writer is flushed to a document.
        See Also:
        Constant Field Values
      • page

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

      • PdfDocumentEvent

        public PdfDocumentEvent​(java.lang.String type)
        Creates a PdfDocumentEvent.
        Parameters:
        type - type of the event 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

      • getPage

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