Skip to main content

Creating TIFF documents with the Kotlin Multiplatform Document Scanner SDK

The Scanbot SDK provides the ability to write scanned images into a TIFF file.

The TIFF Generator includes convenient functions to write scanned images into a multi-page TIFF file, adjust the file's parameters, and encrypt the newly created file.

Note: The SDK can optionally encrypt the TIFF file, offering a high level of protection. To decrypt the TIFF file, you can use a provided encryption key or generate the key yourself using a combination of salt, password, and iterations.

Example code for creating a TIFF from a Document object

If you're working with a Document object, you can create a TIFF as follows:

CreateTiffFromDocument
loading...

Example code for creating a binarized TIFF from a Document object

To create a binarized TIFF instead, use the following approach:

CreateBinarizedTiffFromDocument
loading...

Example code for creating a TIFF from image files

If you're working with images imported from the gallery as bitmaps, you can create a TIFF as follows:

CreateTiffFromImages
loading...

You can omit the TiffGeneratorParameters parameter to use the default TIFF generation settings, in this case TiffGeneratorParameters.default().

You can learn more about TiffGeneratorParameters in the API documentation.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license