AsposeOCR

Inheritance: java.lang.Object

public class AsposeOCR

Main class for recognize text from images.

Constructors

ConstructorDescription
AsposeOCR()Public constructor.

Methods

MethodDescription
CalculateSkew(OcrInput input)Calculates the skew angles of an images.
CompareImageTexts(String fullPath1, String fullPath2)Check if two images contain the same text.
CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings)Check if two images contain the same text.
CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)Check if two images contain the same text.
CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language)Corrects text (replaces misspelled words).
CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language, String dictionaryPath)Corrects text (replaces misspelled words).
DetectDefects(OcrInput input, DefectType defectType)Automatically find problematic areas of an image that can significantly impact the accuracy of OCR.
DetectRectangles(OcrInput input, AreasType areasType, boolean isDetectAreas)Detects text areas on images.
ImageHasText(String fullPath, String text)Check if the image contains the provided text fragment with a case-insensitive search.
ImageHasText(String fullPath, String text, RecognitionSettings settings)Check if the image contains the provided text fragment with a case-insensitive search.
ImageHasText(String fullPath, String text, RecognitionSettings settings, boolean ignoreCase)Check if the image contains the provided text fragment.
ImageHasText(String fullPath, Pattern regex)Check if the image text matches the provided regular expression.
ImageHasText(String fullPath, Pattern regex, RecognitionSettings settings)Check if the image text matches the provided regular expression.
ImageTextDiff(String fullPath1, String fullPath2)Compare the texts on the two images and return a number representing how similar they are (0 to 1).
ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings)Compare the texts on the two images and return a number representing how similar they are (0 to 1).
ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)Compare the texts on the two images and return a number representing how similar they are (0 to 1).
Recognize(OcrInput input)Recognizes image with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
Recognize(OcrInput input, RecognitionSettings settings)Recognizes image with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
RecognizeCarPlate(OcrInput input, CarPlateRecognitionSettings settings)Recognizes car plate with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
RecognizeCharacters(OcrInput input)Detects symbols on images.
RecognizeCharacters(OcrInput input, DetectAreasMode detectAreasMode, Language language)Detects symbols on images.
RecognizeFast(OcrInput input)Recognizes text on good quality image.
RecognizeHandwrittenText(OcrInput input)Recognizes handwritten text on images.
RecognizeIDCard(OcrInput input, IDCardRecognitionSettings settings)Recognizes ID card with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
RecognizeInvoice(OcrInput input, InvoiceRecognitionSettings settings)Recognizes invoice with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
RecognizePassport(OcrInput input, PassportRecognitionSettings settings)Recognizes passport with the ability to specify.
RecognizeReceipt(OcrInput input, ReceiptRecognitionSettings settings)Recognizes receipts with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.
RecognizeStreetPhoto(OcrInput input)Recognizes text on street photos.
SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results)Allows to get multipage document from list of RecognitionResult objects.
SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results, String embeddedFontPath)Allows to get multipage document from list of RecognitionResult objects.
SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results, String embeddedFontPath, PdfOptimizationMode optimizePdf)Allows to get multipage document from list of RecognitionResult objects.
SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results)Allows to get multipage document from list of RecognitionResult objects.
SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, SpellCheck.SpellCheckLanguage language)Allows to get multipage document from list of RecognitionResult objects with spell-check correction.
SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, String embeddedFontPath)Allows to get multipage document from list of RecognitionResult objects.
SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, String embeddedFontPath, PdfOptimizationMode optimizePdf)Allows to get multipage document from list of RecognitionResult objects.

AsposeOCR()

public AsposeOCR()

Public constructor.

CalculateSkew(OcrInput input)

public ArrayList<SkewOutput> CalculateSkew(OcrInput input)

Calculates the skew angles of an images. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputThe container with sources.OcrInput

Returns: java.util.ArrayList<com.aspose.ocr.SkewOutput> - ArrayList of skew angles in degrees SkewOutput

CompareImageTexts(String fullPath1, String fullPath2)

public boolean CompareImageTexts(String fullPath1, String fullPath2)

Check if two images contain the same text.

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.

Returns: boolean - True if images have the same text (90% similarity).

CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings)

public boolean CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings)

Check if two images contain the same text.

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.
settingsRecognitionSettingsRecognition settings.

Returns: boolean - True if images have the same text (90% similarity).

CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)

public boolean CompareImageTexts(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)

Check if two images contain the same text.

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.
settingsRecognitionSettingsRecognition settings.
ignoreCasebooleanTrue - means a case-insensitive search.

Returns: boolean - True if images have the same text (90% similarity).

CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language)

public String CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language)

Corrects text (replaces misspelled words).

Parameters:

ParameterTypeDescription
textjava.lang.StringText for correction.
languageSpellCheckLanguageDictionary to use SpellCheckLanguage.

Returns: java.lang.String - Text with replaced words.

CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language, String dictionaryPath)

public String CorrectSpelling(String text, SpellCheck.SpellCheckLanguage language, String dictionaryPath)

Corrects text (replaces misspelled words).

Parameters:

ParameterTypeDescription
textjava.lang.StringText for correction.
languageSpellCheckLanguageDictionary to use SpellCheckLanguage.
dictionaryPathjava.lang.StringFull path to the user dictionary (frequency dictionary). Dictionary file format: Plain text file in UTF-8 encoding. Word and Word Frequency are separated by comma, the word is expected in the first column and the frequency in the second column. Every word-frequency-pair in a separate line.A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed("\r\n"). Every word is expected to be in lower case.

Returns: java.lang.String - Text with replaced words.

DetectDefects(OcrInput input, DefectType defectType)

public ArrayList<DefectOutput> DetectDefects(OcrInput input, DefectType defectType)

Automatically find problematic areas of an image that can significantly impact the accuracy of OCR. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputThe container with sources.OcrInput
defectTypeDefectTypeThe types of defects to be recognized DefectType.

Returns: java.util.ArrayList<com.aspose.ocr.DefectOutput> - ArrayList of DefectOutput with detected text areas or lines.

DetectRectangles(OcrInput input, AreasType areasType, boolean isDetectAreas)

public ArrayList<RectangleOutput> DetectRectangles(OcrInput input, AreasType areasType, boolean isDetectAreas)

Detects text areas on images. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputThe container with sources.OcrInput
areasTypeAreasTypeDeterminates wich rectangles to return - line or paragraphs.
isDetectAreasbooleanEnable automatic text areas detection.

Returns: java.util.ArrayList<com.aspose.ocr.RectangleOutput> - ArrayList of RectangleOutput with detected text areas or lines.

ImageHasText(String fullPath, String text)

public boolean ImageHasText(String fullPath, String text)

Check if the image contains the provided text fragment with a case-insensitive search.

Parameters:

ParameterTypeDescription
fullPathjava.lang.StringPath to the image.
textjava.lang.StringText fragment for searching on the image.

Returns: boolean - True if image contains text fragment. False - image doesn’t contains text fragment.

ImageHasText(String fullPath, String text, RecognitionSettings settings)

public boolean ImageHasText(String fullPath, String text, RecognitionSettings settings)

Check if the image contains the provided text fragment with a case-insensitive search.

Parameters:

ParameterTypeDescription
fullPathjava.lang.StringPath to the image.
textjava.lang.StringText fragment for searching on the image.
settingsRecognitionSettingsRecognition settings.

Returns: boolean - True if image contains text fragment. False - image doesn’t contains text fragment.

ImageHasText(String fullPath, String text, RecognitionSettings settings, boolean ignoreCase)

public boolean ImageHasText(String fullPath, String text, RecognitionSettings settings, boolean ignoreCase)

Check if the image contains the provided text fragment.

Parameters:

ParameterTypeDescription
fullPathjava.lang.StringPath to the image.
textjava.lang.StringText fragment for searching on the image.
settingsRecognitionSettingsRecognition settings.
ignoreCasebooleanTrue - means a case-insensitive search.

Returns: boolean - True if image contains text fragment. False - image doesn’t contains text fragment.

ImageHasText(String fullPath, Pattern regex)

public boolean ImageHasText(String fullPath, Pattern regex)

Check if the image text matches the provided regular expression.

Parameters:

ParameterTypeDescription
fullPathjava.lang.StringPath to the image.
regexjava.util.regex.Patternjava.util.regex.Pattern object with the provided pattern and options.

Returns: boolean - True if image text matches the provided regular expression.

ImageHasText(String fullPath, Pattern regex, RecognitionSettings settings)

public boolean ImageHasText(String fullPath, Pattern regex, RecognitionSettings settings)

Check if the image text matches the provided regular expression.

Parameters:

ParameterTypeDescription
fullPathjava.lang.StringPath to the image.
regexjava.util.regex.Patternjava.util.regex.Pattern object with the provided pattern and options.
settingsRecognitionSettingsRecognition settings.

Returns: boolean - True if image text matches the provided regular expression.

ImageTextDiff(String fullPath1, String fullPath2)

public float ImageTextDiff(String fullPath1, String fullPath2)

Compare the texts on the two images and return a number representing how similar they are (0 to 1).

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.

Returns: float - 0 means that the texts are completely different; 1 means the texts are identical.

ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings)

public float ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings)

Compare the texts on the two images and return a number representing how similar they are (0 to 1).

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.
settingsRecognitionSettingsRecognition settings.

Returns: float - 0 means that the texts are completely different; 1 means the texts are identical.

ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)

public float ImageTextDiff(String fullPath1, String fullPath2, RecognitionSettings settings, boolean ignoreCase)

Compare the texts on the two images and return a number representing how similar they are (0 to 1).

Parameters:

ParameterTypeDescription
fullPath1java.lang.StringPath to the first image.
fullPath2java.lang.StringPath to the second image.
settingsRecognitionSettingsRecognition settings.
ignoreCasebooleanTrue - means a case-insensitive search.

Returns: float - 0 means that the texts are completely different; 1 means the texts are identical.

Recognize(OcrInput input)

public ArrayList<RecognitionResult> Recognize(OcrInput input)

Recognizes image with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

Recognize(OcrInput input, RecognitionSettings settings)

public ArrayList<RecognitionResult> Recognize(OcrInput input, RecognitionSettings settings)

Recognizes image with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsRecognitionSettingsRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeCarPlate(OcrInput input, CarPlateRecognitionSettings settings)

public ArrayList<RecognitionResult> RecognizeCarPlate(OcrInput input, CarPlateRecognitionSettings settings)

Recognizes car plate with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsCarPlateRecognitionSettingsCarPlateRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeCharacters(OcrInput input)

public ArrayList<CharacterRecognitionResult> RecognizeCharacters(OcrInput input)

Detects symbols on images. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputThe container with sources.OcrInput

Returns: java.util.ArrayList<com.aspose.ocr.CharacterRecognitionResult> - ArrayList of Character with detected symbols data for each image.

RecognizeCharacters(OcrInput input, DetectAreasMode detectAreasMode, Language language)

public ArrayList<CharacterRecognitionResult> RecognizeCharacters(OcrInput input, DetectAreasMode detectAreasMode, Language language)

Detects symbols on images. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputThe container with sources.OcrInput
detectAreasModeDetectAreasModeDetermines the type of neural network used for areas detection.
languageLanguageLanguage used for OCR.

Returns: java.util.ArrayList<com.aspose.ocr.CharacterRecognitionResult> - ArrayList of Character with detected symbols data.

RecognizeFast(OcrInput input)

public ArrayList<String> RecognizeFast(OcrInput input)

Recognizes text on good quality image. Doesn’t use automatic image skew correction and text areas detection. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput instance.

Returns: java.util.ArrayList<java.lang.String> - ArrayList with recognized text.

RecognizeHandwrittenText(OcrInput input)

public ArrayList<RecognitionResult> RecognizeHandwrittenText(OcrInput input)

Recognizes handwritten text on images. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. The container with sources..

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeIDCard(OcrInput input, IDCardRecognitionSettings settings)

public ArrayList<RecognitionResult> RecognizeIDCard(OcrInput input, IDCardRecognitionSettings settings)

Recognizes ID card with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsIDCardRecognitionSettingsIDCardRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeInvoice(OcrInput input, InvoiceRecognitionSettings settings)

public ArrayList<RecognitionResult> RecognizeInvoice(OcrInput input, InvoiceRecognitionSettings settings)

Recognizes invoice with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsInvoiceRecognitionSettingsInvoiceRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizePassport(OcrInput input, PassportRecognitionSettings settings)

public ArrayList<RecognitionResult> RecognizePassport(OcrInput input, PassportRecognitionSettings settings)

Recognizes passport with the ability to specify. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsPassportRecognitionSettingsPassportRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeReceipt(OcrInput input, ReceiptRecognitionSettings settings)

public ArrayList<RecognitionResult> RecognizeReceipt(OcrInput input, ReceiptRecognitionSettings settings)

Recognizes receipts with the ability to specify Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. instance.
settingsReceiptRecognitionSettingsReceiptRecognitionSettings.

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

RecognizeStreetPhoto(OcrInput input)

public ArrayList<RecognitionResult> RecognizeStreetPhoto(OcrInput input)

Recognizes text on street photos. Extract text from street photos, traffic camera images, ID cards, driver licenses, and other images with sparse text and noisy/colored backgrounds. Supports GIF, PNG, JPEG, WBMP, TIFF, JFIF, TIFF, PDF, InputStream, BufferedImage, folder, array, zip archive, URL, base64.

Parameters:

ParameterTypeDescription
inputOcrInputOcrInput. The container with sources..

Returns: java.util.ArrayList<com.aspose.ocr.RecognitionResult> - RecognitionResult list with images recognition results RecognitionResult

SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results)

public static void SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList<RecognitionResult> results)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, PdfNoImg, Xlsx, Xml, Json, Rtf).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.

SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results, String embeddedFontPath)

public static void SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList<RecognitionResult> results, String embeddedFontPath)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, PdfNoImg, Xlsx, Xml, Json, Rtf).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.
embeddedFontPathjava.lang.StringOptionally. Full path to the user font.

SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList results, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public static void SaveMultipageDocument(OutputStream stream, Format saveFormat, ArrayList<RecognitionResult> results, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, PdfNoImg, Xlsx, Xml, Json, Rtf).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.
embeddedFontPathjava.lang.StringOptionally. Full path to the user font.
optimizePdfPdfOptimizationModeReduce the PDF file size by lowering the quality of background images. By default, the original image quality is preserved.

SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results)

public static void SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList<RecognitionResult> results)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Xml, Json).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.

SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, SpellCheck.SpellCheckLanguage language)

public static void SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList<RecognitionResult> results, SpellCheck.SpellCheckLanguage language)

Allows to get multipage document from list of RecognitionResult objects with spell-check correction.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Xml, Json).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.
languageSpellCheckLanguageSpellCheckLanguage enum value.

SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, String embeddedFontPath)

public static void SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList<RecognitionResult> results, String embeddedFontPath)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Xml, Json).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.
embeddedFontPathjava.lang.StringOptionally. Full path to the user font.

SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList results, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public static void SaveMultipageDocument(String fullFileName, Format saveFormat, ArrayList<RecognitionResult> results, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Allows to get multipage document from list of RecognitionResult objects.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Xml, Json).
resultsjava.util.ArrayList<com.aspose.ocr.RecognitionResult>List of RecognitionResult. objects.
embeddedFontPathjava.lang.StringOptionally. Full path to the user font.
optimizePdfPdfOptimizationModeReduce the PDF file size by lowering the quality of background images. By default, the original image quality is preserved.