IPdfGenerator

interface IPdfGenerator

Inheritors

Functions

Link copied to clipboard
abstract fun addPage(image: ImageRef, binarization: PageBinarization = PageBinarization.ENABLED_IF_BINARIZATION_FILTER_SET): Result<Unit>

Adds a page to the PDF document from an ImageRef

Link copied to clipboard
abstract fun addPageImagePath(imagePath: String, binarization: PageBinarization = PageBinarization.ENABLED_IF_BINARIZATION_FILTER_SET): Result<Unit>

Adds a page to the PDF document from an image file path. It is recommended to use addPage with ImageRef created in a lazy mode instead.

Link copied to clipboard
abstract fun addPageJPEG(jpeg: ByteArray, binarization: PageBinarization = PageBinarization.ENABLED_IF_BINARIZATION_FILTER_SET): Result<Unit>

Adds a page to the PDF document from a JPEG byte array. It is recommended to use addPage with ImageRef created in a lazy mode instead.

Link copied to clipboard
abstract fun beginRender(stream: OutputStream, pdfConfig: PdfConfiguration): Result<Unit>
Link copied to clipboard
abstract fun beginRenderToFilePath(pdfFilePath: String, pdfConfig: PdfConfiguration): Result<Unit>
Link copied to clipboard
abstract fun dispose()
Link copied to clipboard
abstract fun endRender(): Result<ByteArray?>