OcrOutput

Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, java.util.ArrayList

public class OcrOutput extends ArrayList<RecognitionResult>

Constructors

ConstructorDescription
OcrOutput()Initializes a new instance of the OcrOutput class with an empty collection.

Methods

MethodDescription
save(OutputStream stream)Save all recognition results to a memory stream in the specified format.
save(OutputStream stream, Format saveFormat)Save all recognition results to a memory stream in the specified format.
save(OutputStream stream, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)Save all recognition results to a memory stream in the specified format.
save(String fullFileName)Save all recognition result to a file.
save(String fullFileName, Format saveFormat)Save all recognition result to a file.
save(String fullFileName, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)Save all recognition result to a file.
savePdf(OutputStream stream)Save all recognition results into an in-memory searchable PDF document, embedding the original images as the background.
savePdf(OutputStream stream, String embeddedFontPath, PdfOptimizationMode optimizePdf)Save all recognition results into an in-memory searchable PDF document, embedding the original images as the background.
savePdf(String fullFileName)Save all recognition results into a searchable PDF file, with the original images set as the background.
savePdf(String fullFileName, String embeddedFontPath, PdfOptimizationMode optimizePdf)Save all recognition results into a searchable PDF file, with the original images set as the background.

save(OutputStream stream)

public void save(OutputStream stream)

Save all recognition results to a memory stream in the specified format.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.

save(OutputStream stream, Format saveFormat)

public void save(OutputStream stream, Format saveFormat)

Save all recognition results to a memory stream in the specified format.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub).

save(OutputStream stream, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public void save(OutputStream stream, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Save all recognition results to a memory stream in the specified format.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub).
embeddedFontPathjava.lang.StringOptional. 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.

save(String fullFileName)

public void save(String fullFileName)

Save all recognition result to a file.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.

save(String fullFileName, Format saveFormat)

public void save(String fullFileName, Format saveFormat)

Save all recognition result to a file.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub).

save(String fullFileName, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public void save(String fullFileName, Format saveFormat, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Save all recognition result to a file.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
saveFormatFormatDocument format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub).
embeddedFontPathjava.lang.StringOptional. 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.

savePdf(OutputStream stream)

public void savePdf(OutputStream stream)

Save all recognition results into an in-memory searchable PDF document, embedding the original images as the background.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.

savePdf(OutputStream stream, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public void savePdf(OutputStream stream, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Save all recognition results into an in-memory searchable PDF document, embedding the original images as the background.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamOutputStream for saving recognition result in the selected format.
embeddedFontPathjava.lang.StringOptional. 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.

savePdf(String fullFileName)

public void savePdf(String fullFileName)

Save all recognition results into a searchable PDF file, with the original images set as the background.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.

savePdf(String fullFileName, String embeddedFontPath, PdfOptimizationMode optimizePdf)

public void savePdf(String fullFileName, String embeddedFontPath, PdfOptimizationMode optimizePdf)

Save all recognition results into a searchable PDF file, with the original images set as the background.

Parameters:

ParameterTypeDescription
fullFileNamejava.lang.StringFilename with a path for saving recognition result in the selected format.
embeddedFontPathjava.lang.StringOptional. 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.

size()

public int size()

Returns: int