Package de.xima.fc.pdf.form
Interface IPdfFormVisitor<T>
-
- Type Parameters:
T
- Type of the result obtained when processing finished.
public interface IPdfFormVisitor<T>
Visitor with custom logic forPdfFormProcessor
. Users provide their own implementation of this interface with whatever logic they desire.- Since:
- 7.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getResult()
Called after the document was fully processed.void
visitDocument(IPdfDocument document)
Called when document processing starts.void
visitFormField(IPdfAcroField field, IPdfPage page)
Called when a form field is encountered in the PDF document.void
visitImage(IPdfImage image, IPdfPage page)
Called when an image is encountered in the PDF document.void
visitLine(IPdfLine line, IPdfPage page)
Called when a piece of plain text is encountered in the PDF document.void
visitPage(IPdfPage page)
Called when a page is encountered in the PDF document.
-
-
-
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.
-
-