Skip to main content

Creating TIFF Documents | Flutter Document Scanner

TIFF Creation

ScanbotSdk.createTiff(pages, options);

The Scanbot SDK renders the given page images into a multi-page TIFF file and stores it as a file. For each DOCUMENT image a separate page is generated.

List<Page> pages = ...
var options = TiffCreationOptions(binarized: true, dpi: 300, compression: TiffCompression.CCITT_T6);
Uri tiffFileUri = await ScanbotSdk.createTiff(pages, options);
  • pages - a list of valid Page objects. Each page should have the cropped DOCUMENT image.
  • options - TiffCreationOptions:
    • binarized : Optional boolean flag to create binarized (one bit encoded) black-and-white images. If true, the input images will be binarized and the output TIFF file will be saved with one bit per pixel. If false, the input images will be stored as-is. The default value is true.
    • dpi : Dots Per Inch as an optional integer value. The default value is 200 dpi. Please note that the DPI value is just meta data. It does not affect the quality or the resolution of the TIFF image file. The resolution of the output TIFF images will stay the same as that of the input images.
    • compression : Optional TIFF compression type. Default value is LZW. See supported types below.

Supported TIFF compression types:

  • TiffCompression.CCITTRLE
  • TiffCompression.CCITTFAX3
  • TiffCompression.CCITT_T4
  • TiffCompression.CCITTFAX4
  • TiffCompression.CCITT_T6
  • TiffCompression.CCITTRLEW
  • TiffCompression.LZW
  • TiffCompression.PACKBITS
  • TiffCompression.DEFLATE
  • TiffCompression.ADOBE_DEFLATE

⚠️️️ Please note that some compression types are only compatible for binarized images (1-bit encoded black & white images)!

See the list PredefinedCompressionTypes.binarizedOnlyCompressionTypes().

Want to scan longer than one minute?

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

Get your free Trial License

What do you think of this documentation?

On this page

Scroll to top