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 LocalInputSource
asInputSource()
Return the image in a format suitable for sending to MindeeClient for parsing.String
getFilename()
BufferedImage
getImage()
String
getOriginalFilename()
int
getOriginalIndex()
String
getSaveFormat()
void
writeToFile(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:
IOException
MindeeException
-
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()
-
-