Package com.mindee.pdf
Class PdfPageImage
- java.lang.Object
-
- com.mindee.pdf.PdfPageImage
-
public class PdfPageImage extends Object
A page in a PDF extracted as an image.
-
-
Constructor Summary
Constructors Constructor Description PdfPageImage(BufferedImage image, int originalIndex, String originalFilename, String saveFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalInputSourceasInputSource()Return the image in a format suitable for sending to MindeeClient for parsing.StringgetFilename()BufferedImagegetImage()StringgetOriginalFilename()intgetOriginalIndex()StringgetSaveFormat()voidwriteToFile(String outputPath)Write the image to a file.
-
-
-
Constructor Detail
-
PdfPageImage
public PdfPageImage(BufferedImage image, int originalIndex, String originalFilename, String saveFormat)
-
-
Method Detail
-
asInputSource
public LocalInputSource asInputSource() throws IOException
Return the image in a format suitable for sending to MindeeClient for parsing.- Returns:
- an instance of
LocalInputSource - Throws:
IOException
-
writeToFile
public void writeToFile(String outputPath) throws IOException, MindeeException
Write the image to a file. Uses the default image format and filename.- Parameters:
outputPath- the output directory (must exist).- Throws:
IOExceptionMindeeException
-
getFilename
public String getFilename()
- Returns:
- An auto-generated filename String.
-
getImage
public BufferedImage getImage()
-
getOriginalIndex
public int getOriginalIndex()
-
getSaveFormat
public String getSaveFormat()
-
getOriginalFilename
public String getOriginalFilename()
-
-