Package com.mindee.v1.fileoperations
Class PDFExtractor
- java.lang.Object
-
- com.mindee.pdf.BasePDFExtractor
-
- com.mindee.v1.fileoperations.PDFExtractor
-
public class PDFExtractor extends BasePDFExtractor
PDF extraction class.
-
-
Field Summary
-
Fields inherited from class com.mindee.pdf.BasePDFExtractor
filename, sourcePdf
-
-
Constructor Summary
Constructors Constructor Description PDFExtractor(LocalInputSource source)Init from aLocalInputSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ExtractedPDF>extractInvoices(List<InvoiceSplitterV1InvoicePageGroup> pageIndexes)Extract invoices from the given page indexes (from an invoice-splitter prediction).List<ExtractedPDF>extractInvoices(List<InvoiceSplitterV1InvoicePageGroup> pageIndexes, boolean strict)Extract invoices from the given page indexes (from an invoice-splitter prediction).-
Methods inherited from class com.mindee.pdf.BasePDFExtractor
extractSinglePage, extractSubDocuments, makeFilename
-
-
-
-
Constructor Detail
-
PDFExtractor
public PDFExtractor(LocalInputSource source) throws IOException
Init from aLocalInputSource.- Parameters:
source- The local source.- Throws:
IOException- Throws if the file can't be accessed.
-
-
Method Detail
-
extractInvoices
public List<ExtractedPDF> extractInvoices(List<InvoiceSplitterV1InvoicePageGroup> pageIndexes) throws IOException
Extract invoices from the given page indexes (from an invoice-splitter prediction).- Parameters:
pageIndexes- List of page indexes.- Returns:
- a list of extracted files.
- Throws:
IOException- Throws if the file can't be accessed.
-
extractInvoices
public List<ExtractedPDF> extractInvoices(List<InvoiceSplitterV1InvoicePageGroup> pageIndexes, boolean strict) throws IOException
Extract invoices from the given page indexes (from an invoice-splitter prediction).- Parameters:
pageIndexes- List of page indexes.strict- Whether the extraction should strictly follow the confidence scores or not.- Returns:
- a list of extracted files.
- Throws:
IOException- Throws if the file can't be accessed.
-
-