Class ScanbotPdfGenerator
-
- All Implemented Interfaces:
-
io.scanbot.sdk.process.PdfGenerator
public final class ScanbotPdfGenerator implements PdfGenerator
Provides methods for PDF generation
-
-
Constructor Summary
Constructors Constructor Description ScanbotPdfGenerator(Context context, FileIOProcessor fileIOProcessor, OcrPdfGenerator ocrGenerator, DocumentStoreStrategy documentStoreStrategy, BlobManager blobManager, SimpleComposer simpleComposer, OcrSettings ocrSettings, SapManager sapManager)
-
Method Summary
Modifier and Type Method Description File
generateFromUris(Array<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris Boolean
generateFromUris(Array<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris File
generateFromPages(Array<Page> pages, PdfConfiguration pdfConfig)
Generate PDF from given list of Page objects Boolean
generateFromPages(Array<Page> pages, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects Boolean
generateFromDocument(Document sourceDocument, PdfConfiguration pdfConfig)
Generate PDF from given Document Boolean
generateFromDocument(Document sourceDocument, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given Document File
generateWithOcrFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. File
generateWithOcrFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. File
generateWithOcrFromPages(List<Page> pages, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Boolean
generateWithOcrFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Boolean
generateWithOcrFromDocument(Document document, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Boolean
generateWithOcrFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. -
-
Constructor Detail
-
ScanbotPdfGenerator
ScanbotPdfGenerator(Context context, FileIOProcessor fileIOProcessor, OcrPdfGenerator ocrGenerator, DocumentStoreStrategy documentStoreStrategy, BlobManager blobManager, SimpleComposer simpleComposer, OcrSettings ocrSettings, SapManager sapManager)
-
-
Method Detail
-
generateFromUris
File generateFromUris(Array<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris
- Parameters:
imageFileUris
- array of source images urissourceFilesEncrypted
- should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - falsepdfConfig
- extra PDF configuration
-
generateFromUris
Boolean generateFromUris(Array<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig)
Generate PDF from given images uris
- Parameters:
imageFileUris
- array of source images urisoutputFile
- target PDF filesourceFilesEncrypted
- should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - falsepdfConfig
- extra PDF configuration
-
generateFromPages
File generateFromPages(Array<Page> pages, PdfConfiguration pdfConfig)
Generate PDF from given list of Page objects
- Parameters:
pages
- array of source pagespdfConfig
- extra PDF configuration
-
generateFromPages
Boolean generateFromPages(Array<Page> pages, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given array of Page objects
- Parameters:
pages
- array of source pagesoutputFile
- target PDF filepdfConfig
- extra PDF configuration
-
generateFromDocument
Boolean generateFromDocument(Document sourceDocument, PdfConfiguration pdfConfig)
Generate PDF from given Document
- Parameters:
sourceDocument
- source documentpdfConfig
- extra PDF configuration
-
generateFromDocument
Boolean generateFromDocument(Document sourceDocument, File outputFile, PdfConfiguration pdfConfig)
Generate PDF from given Document
- Parameters:
sourceDocument
- source documentoutputFile
- target PDF filepdfConfig
- extra PDF configuration
-
generateWithOcrFromUris
File generateWithOcrFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris
- list of image file URIssourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromUris
File generateWithOcrFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris
- list of image file URIsoutputFile
- the output PDF filesourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCRpdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromPages
File generateWithOcrFromPages(List<Page> pages, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages
- list of Page objects.pdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromPages
Boolean generateWithOcrFromPages(List<Page> pages, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages
- list of Page objects.outputFile
- the output PDF filepdfConfig
- the PDF configurationocrConfig
- the OCR configuration
-
generateWithOcrFromDocument
Boolean generateWithOcrFromDocument(Document document, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.pdfConfig
- the PDF configuration.ocrConfig
- the OCR configuration.
-
generateWithOcrFromDocument
Boolean generateWithOcrFromDocument(Document document, File outputFile, PdfConfiguration pdfConfig, OcrEngine.OcrConfig ocrConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document
- the document to perform OCR on and create a PDF from.outputFile
- the output PDF filepdfConfig
- the PDF configuration.ocrConfig
- the OCR configuration.
-
-
-
-