PdfGenerator

interface PdfGenerator

Provides methods for PDF generation.

Inheritors

Functions

Link copied to clipboard
abstract fun generate(document: Document, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<Unit>
abstract fun generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<Unit>

Generate PDF from given Document.

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

Generate PDF from given list of Page objects.

abstract fun generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<File>
abstract fun generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<Unit>

Generate PDF from given images Uris.

Link copied to clipboard
fun PdfGenerator.generate(document: Document, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): 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.

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

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.

fun PdfGenerator.generate(document: Document, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): 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.

fun PdfGenerator.generate(imageFileUris: List<Uri>, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<File>
fun PdfGenerator.generate(imageFileUris: List<Uri>, outputFile: File, sourceFilesEncrypted: Boolean = false, pdfConfig: PdfConfiguration = PdfConfiguration.default(), sourceOcrPages: List<Page> = emptyList()): Result<Unit>

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

Link copied to clipboard
abstract fun generateFromImageRefs(images: List<ImageRef>, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<File>
abstract fun generateFromImageRefs(images: List<ImageRef>, outputFile: File, pdfConfig: PdfConfiguration = PdfConfiguration.Companion.default()): Result<Unit>

Generate PDF from given images ImageRefs.