Package com.mindee.pdf
Class ExtractedPDF
- java.lang.Object
-
- com.mindee.pdf.ExtractedPDF
-
public class ExtractedPDF extends Object
An extracted sub-PDF.
-
-
Constructor Summary
Constructors Constructor Description ExtractedPDF(byte[] fileBytes, String filename)Default constructor.
-
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.byte[]getFileBytes()StringgetFilename()voidwriteToFile(String outputPath)Write the PDF to a file.
-
-
-
Constructor Detail
-
ExtractedPDF
public ExtractedPDF(byte[] fileBytes, String filename)Default constructor.- Parameters:
fileBytes- PDF file as bytes.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.
-
getFileBytes
public byte[] getFileBytes()
-
getFilename
public String getFilename()
-
-