Package com.mindee.extraction
Class ExtractedPDF
- java.lang.Object
-
- com.mindee.extraction.ExtractedPDF
-
public class ExtractedPDF extends Object
An extracted sub-PDF.
-
-
Constructor Summary
Constructors Constructor Description ExtractedPDF(org.apache.pdfbox.pdmodel.PDDocument pdf, String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalInputSourceasInputSource()Return the file in a format suitable for sending to MindeeClient for parsing.StringgetFilename()org.apache.pdfbox.pdmodel.PDDocumentgetPdf()voidwriteToFile(String outputPath)Write the PDF to a file.
-
-
-
Constructor Detail
-
ExtractedPDF
public ExtractedPDF(org.apache.pdfbox.pdmodel.PDDocument pdf, String filename)- Parameters:
pdf- PDF wrapper object.filename- Name of the extracted file.
-
-
Method Detail
-
writeToFile
public void writeToFile(String outputPath) throws IOException
Write the PDF to a file.- Parameters:
outputPath- the output directory (must exist).- Throws:
IOException- Throws if the file can't be accessed.
-
asInputSource
public LocalInputSource asInputSource() throws IOException
Return the file in a format suitable for sending to MindeeClient for parsing.- Returns:
- an instance of
LocalInputSource - Throws:
IOException- Throws if the file can't be accessed.
-
getPdf
public org.apache.pdfbox.pdmodel.PDDocument getPdf()
-
getFilename
public String getFilename()
-
-