ImageWriter Module Pixelnetica™ Document Scanning SDK for .NET MAUI
The ImageWriter module provides functionality for saving processed images or scanned pages into various output formats, such as JPEG, PNG, PDF, or TIFF.
Creation
We recommend using using
statements to ensure writer instances are automatically disposed of after use.
using (ImageWriter writer = new ImageWriter(ImageWriter.EImageFileType.Pdf))
{
...
}
The module supports the following writer types:
Writer Type | Description |
---|---|
ImageSdkLibrary.ImageWriterJpeg | Writes color JPEG images. |
ImageSdkLibrary.ImageWriterPng | Writes color PNG images. |
ImageSdkLibrary.ImageWriterWebM | Writes WebM images. |
ImageSdkLibrary.ImageWriterPngExt | Writes 1-bit black-and-white PNG images. |
ImageSdkLibrary.ImageWriterPdf | Writes PDF documents. |
ImageSdkLibrary.ImageWriterTiff | Writes 1-bit black-and-white TIFF-G4 compressed images (most compact black-and-white format). |
Writing Images
To write one or multiple images (or document pages), specify the output file path:
writer.Open(filePath);
You can also configure additional optional parameters specific to the writer type (e.g., JPEG compression quality or PDF page size):
writer.Configure(key, value);
To write a single image or page:
writer.Write(image);
For multipage documents, call Write()
multiple times for each page.
Further Reference
For more details, please refer to the .NET MAUI demo application source code on GitHub.