OcrOutput
Inheritance: java.lang.Object, java.util.AbstractCollection, java.util.AbstractList, java.util.ArrayList
public class OcrOutput extends ArrayList<RecognitionResult>
Constructors
Constructor | Description |
---|---|
OcrOutput() | Initializes a new instance of the OcrOutput class with an empty collection. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | OutputStream 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:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | OutputStream for saving recognition result in the selected format. |
saveFormat | Format | Document 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:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | OutputStream for saving recognition result in the selected format. |
saveFormat | Format | Document format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub). |
embeddedFontPath | java.lang.String | Optional. Full path to the user font. |
optimizePdf | PdfOptimizationMode | Reduce 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:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename 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:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result in the selected format. |
saveFormat | Format | Document 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:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result in the selected format. |
saveFormat | Format | Document format (Docx, Txt, Pdf, Xlsx, Rtf, Json, Xml, Epub). |
embeddedFontPath | java.lang.String | Optional. Full path to the user font. |
optimizePdf | PdfOptimizationMode | Reduce 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:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | OutputStream 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:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | OutputStream for saving recognition result in the selected format. |
embeddedFontPath | java.lang.String | Optional. Full path to the user font. |
optimizePdf | PdfOptimizationMode | Reduce 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:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename 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:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result in the selected format. |
embeddedFontPath | java.lang.String | Optional. Full path to the user font. |
optimizePdf | PdfOptimizationMode | Reduce 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