Skip to main content

Creating TIFF Documents | Flutter Document Scanner

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(binarizationFilter: CustomBinarizationFilter(), 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:
    • binarizationFilter : An SDK supported binarization ParametricFilter: ScanbotBinarizationFilter, CustomBinarizationFilter, a binarization LegacyFilter , or null.
    • dpi : Optional integer specifying Dots Per Inch (DPI). The default value is 72 dpi. Note that the DPI value is metadata and does not affect the quality or resolution of the TIFF image file. The resolution of the output TIFF images will remain the same as that of the input images.
    • compression : Optional TIFF compression type. The default value is "LZW". Please note that some compression types are only compatible with binarized images (1-bit encoded black & white images).

Supported TIFF compression types:

  • TiffCompression.NONE
  • TiffCompression.CCITTRLE
  • TiffCompression.CCITT_T4
  • TiffCompression.CCITT_T6
  • TiffCompression.CCITTRLEW
  • TiffCompression.LZW
  • TiffCompression.PACKBITS
  • TiffCompression.DEFLATE
  • TiffCompression.ADOBE_DEFLATE
caution

Please note that some compression types are only compatible with binarized images (1-bit encoded black & white images).

Refer to the list of PredefinedCompressionTypes.binarizedOnlyCompressionTypes() for more details.

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?