ImageWriterTiff Class

class ImageWriterTiff(file: File) : ImageWriter

Writes scanned pages to a black-and-white TIFF.

Every page is binarised to pure black and white, which is what fax-style and archival TIFF workflows expect and what keeps the files small. Colour and greyscale pages are binarised too, so this is not the writer to choose when colour matters.

Parameters

  • file — the file to write to. It is created if it does not exist and overwritten if it does.

Throws

  • ScanningSdkException — if the file cannot be created or opened for writing. The TIFF is opened during construction, so this surfaces here rather than at the first write.

Constructors

ImageWriterTiff

constructor(file: File)

Functions

close

@Synchronized open override fun close()

Finish rendering and release the writer’s native memory.

setupFooter

open external fun setupFooter(text: String, url: String, height: ImageWriter.Dimension)

Adds a footer line to every page of the output.

setupPaper

open external fun setupPaper(paper: ImageWriter.Paper, orientation: ImageWriter.Paper.Orientation)

Sets the output page size from explicit measurements.

setupPaperSize

open external fun setupPaperSize(paperSize: ImageWriter.Paper.Size, orientation: ImageWriter.Paper.Orientation)

Sets the output page size from a standard paper size.

write

open external fun write(image: ScanPicture): File

Appends one page to the output file.

Top