Interface IPdfFormVisitor<T>

  • Type Parameters:
    T - Type of the result obtained when processing finished.

    public interface IPdfFormVisitor<T>
    Visitor with custom logic for PdfFormProcessor. Users provide their own implementation of this interface with whatever logic they desire.
    Since:
    7.2.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getResult

        T getResult()
             throws IOException
        Called after the document was fully processed. Most handlers will accumulated some state or value during processing, this method should return the data extracted from the PDF.
        Returns:
        The accumulated result.
        Throws:
        IOException - When the result could not be created.
      • visitDocument

        void visitDocument​(IPdfDocument document)
                    throws IOException
        Called when document processing starts. This is called before all other methods .
        Parameters:
        document - Document about to be processed.
        Throws:
        IOException - When the visitor could not process the document.
      • visitFormField

        void visitFormField​(IPdfAcroField field,
                            IPdfPage page)
                     throws IOException
        Called when a form field is encountered in the PDF document.
        Parameters:
        field - Form field contained in the PDF document.
        page - Page containing the form field.
        Throws:
        IOException - When the visitor could not process the form field.
      • visitImage

        void visitImage​(IPdfImage image,
                        IPdfPage page)
                 throws IOException
        Called when an image is encountered in the PDF document.
        Parameters:
        image - Image contained in the PDF document.
        page - Page containing the image.
        Throws:
        IOException - When the visitor could not process the image.
      • visitPage

        void visitPage​(IPdfPage page)
                throws IOException
        Called when a page is encountered in the PDF document. This is called before the other methods are called for the individual items in the page.
        Parameters:
        page - A page of the PDF document.
        Throws:
        IOException - When the visitor could not process the form field.
      • visitLine

        void visitLine​(IPdfLine line,
                       IPdfPage page)
                throws IOException
        Called when a piece of plain text is encountered in the PDF document.
        Parameters:
        line - Text contained in the PDF document.
        page - Page containing the text.
        Throws:
        IOException - When the visitor could not process the text.