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 for
PdfFormProcessor
. Users provide their own implementation of this interface with
whatever logic they desire.- Since:
- 7.2.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionCalled 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
Called when a piece of plain text is encountered in the PDF document.void
Called when a page is encountered in the PDF document.
-
Method Details
-
getResult
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
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
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
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
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
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.
-