generate

abstract fun generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): 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


abstract fun generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): 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


abstract fun generate(document: Document, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): 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


abstract fun generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): 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


abstract fun generate(pages: List<Page>, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<File>

Deprecated

Use generateFromDocument() instead

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


abstract fun generate(pages: List<Page>, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<Unit>

Deprecated

Use generateFromDocument() instead

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