Package com.mindee.input
Class LocalInputSource
- java.lang.Object
- 
- com.mindee.input.LocalInputSource
 
- 
 public final class LocalInputSource extends Object A source document for Mindee API operations.
- 
- 
Constructor SummaryConstructors Constructor Description LocalInputSource(byte[] fileAsByteArray, String filename)LocalInputSource(File file)LocalInputSource(InputStream file, String filename)LocalInputSource(String filePath)LocalInputSource(String fileAsBase64, String filename)LocalInputSource(Path filePath)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyPageOptions(PageOptions pageOptions)Applies PDF-specific operations on the current file based on the specifiedPageOptions.voidcompress()voidcompress(Integer quality)voidcompress(Integer quality, Integer maxWidth)voidcompress(Integer quality, Integer maxWidth, Integer maxHeight)voidcompress(Integer quality, Integer maxWidth, Integer maxHeight, Boolean forceSourceText)voidcompress(Integer quality, Integer maxWidth, Integer maxHeight, Boolean forceSourceText, Boolean disableSourceText)byte[]getFile()StringgetFilename()intgetPageCount()Get the number of pages in the document.booleanhasSourceText()booleanisPdf()
 
- 
- 
- 
Constructor Detail- 
LocalInputSourcepublic LocalInputSource(InputStream file, String filename) throws IOException - Throws:
- IOException
 
 - 
LocalInputSourcepublic LocalInputSource(String filePath) throws IOException - Throws:
- IOException
 
 - 
LocalInputSourcepublic LocalInputSource(Path filePath) throws IOException - Throws:
- IOException
 
 - 
LocalInputSourcepublic LocalInputSource(File file) throws IOException - Throws:
- IOException
 
 - 
LocalInputSourcepublic LocalInputSource(byte[] fileAsByteArray, String filename)
 
- 
 - 
Method Detail- 
getPageCountpublic int getPageCount() throws IOExceptionGet the number of pages in the document.- Returns:
- the number of pages in the current file.
- Throws:
- IOException- If an I/O error occurs during the PDF operation.
 
 - 
applyPageOptionspublic void applyPageOptions(PageOptions pageOptions) throws IOException Applies PDF-specific operations on the current file based on the specifiedPageOptions.- Parameters:
- pageOptions- The options specifying which pages to modify or retain in the PDF file.
- Throws:
- IOException- If an I/O error occurs during the PDF operation.
 
 - 
isPdfpublic boolean isPdf() 
 - 
hasSourceTextpublic boolean hasSourceText() 
 - 
compresspublic void compress(Integer quality, Integer maxWidth, Integer maxHeight, Boolean forceSourceText, Boolean disableSourceText) throws IOException - Throws:
- IOException
 
 - 
compresspublic void compress(Integer quality, Integer maxWidth, Integer maxHeight, Boolean forceSourceText) throws IOException - Throws:
- IOException
 
 - 
compresspublic void compress(Integer quality, Integer maxWidth, Integer maxHeight) throws IOException - Throws:
- IOException
 
 - 
compresspublic void compress(Integer quality, Integer maxWidth) throws IOException - Throws:
- IOException
 
 - 
compresspublic void compress(Integer quality) throws IOException - Throws:
- IOException
 
 - 
compresspublic void compress() throws IOException- Throws:
- IOException
 
 - 
getFilepublic byte[] getFile() 
 - 
getFilenamepublic String getFilename() 
 
- 
 
-