generate

open override fun generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean, pdfConfig: PdfConfiguration): Result<File>

Generate PDF from given images Uris.

Return

Result.Success with generated PDF File if PDF was generated successfully, Result.*Error otherwise.

Parameters

imageFileUris

list of source images uris

sourceFilesEncrypted

should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - false

pdfConfig

extra PDF configuration


open override fun generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean, pdfConfig: PdfConfiguration): Result<Unit>

Generate PDF from given images Uris.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

imageFileUris

list of source images uris

outputFile

target PDF file

sourceFilesEncrypted

should be true if source files are encrypted with Scanbot SDK encryption mechanism, otherwise - false

pdfConfig

extra PDF configuration


open override fun generate(pages: List<Page>, pdfConfig: PdfConfiguration): Result<File>

Generate PDF from given list of Page objects.

Return

Result.Success with generated PDF File if PDF was generated successfully, Result.*Error otherwise.

Parameters

pages

list of source pages

pdfConfig

extra PDF configuration


open override fun generate(pages: List<Page>, outputFile: File, pdfConfig: PdfConfiguration): Result<Unit>

Generate PDF from given list of Page objects.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

pages

list of source pages

outputFile

target PDF file

pdfConfig

extra PDF configuration


open override fun generate(document: Document, pdfConfig: PdfConfiguration): Result<Unit>

Generate PDF from given Document.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

document

source document

pdfConfig

extra PDF configuration


open override fun generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration): Result<Unit>

Generate PDF from given Document.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

document

source document

outputFile

target PDF file

pdfConfig

extra PDF configuration


open override fun generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<File>

Creates sandwiched OCR PDF file from given image file URIs and provided source list of Page OCR data.

Return

Result.Success with generated PDF File if PDF was generated successfully, Result.*Error otherwise.

Parameters

imageFileUris

list of image file URIs

sourceFilesEncrypted

if true, the image files are encrypted and will be decrypted before OCR

pdfConfig

the PDF configuration

sourceOcrPages

the source list of Page OCR data.


open override fun generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<Unit>

Creates sandwiched OCR PDF file from given image file URIs and provided source list of Page OCR data.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise

Parameters

imageFileUris

list of image file URIs

outputFile

the output PDF file

sourceFilesEncrypted

if true, the image files are encrypted and will be decrypted before OCR

pdfConfig

the PDF configuration

sourceOcrPages

the source list of Page OCR data


open override fun generate(document: Document, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<Unit>

Creates sandwiched OCR PDF file from given Document and provided source list of Page OCR data with provided languages. Uses the document image from a io.scanbot.sdk.docprocessing.Page.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

document

the document to perform OCR on and create a PDF from.

pdfConfig

the PDF configuration.

sourceOcrPages

the source list of Page OCR data.


open override fun generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<Unit>

Creates sandwiched OCR PDF file from given Document and provided source list of Page OCR data with provided languages.. Uses the document image from a io.scanbot.sdk.docprocessing.Page.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise.

Parameters

document

the document to perform OCR on and create a PDF from.

outputFile

the output PDF file

pdfConfig

the PDF configuration.

sourceOcrPages

the source list of Page OCR data.


open override fun generate(pages: List<Page>, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<File>

Deprecated

Use generateWithOcrPagesFromDocument() instead

Creates sandwiched OCR PDF file from given Page objects and provided source list of Page OCR data with provided languages. Uses the document image from a Page.

Return

Result.Success with generated PDF File if PDF was generated successfully, Result.*Error otherwise.

Parameters

pages

list of Page objects.

pdfConfig

the PDF configuration.

sourceOcrPages

the source list of Page OCR data.


open override fun generate(pages: List<Page>, outputFile: File, pdfConfig: PdfConfiguration, sourceOcrPages: List<Page>): Result<Unit>

Deprecated

Use generateWithOcrPagesFromDocument() instead

Creates sandwiched OCR PDF file from given Page objects and provided source list of Page OCR data with provided languages. Uses the document image from a Page.

Return

Result.Success if PDF was generated successfully, Result.*Error otherwise

Parameters

pages

list of Page objects.

outputFile

the output PDF file

pdfConfig

the PDF configuration

sourceOcrPages

the source list of Page OCR data.