GroupDocs.Watermark library equipped with the capability to generate preview images for every page of your documents, simplifying your workflow and enhancing efficiency. With this feature, users can effortlessly preview their documents with a glance, enabling swift navigation and ensuring seamless accessibility to crucial content.
Generate document preview
To create document preview:
Create an instance of the Watermarker class for a local file or file stream;
Instantiate the PreviewOptions object with the delegate for stream creation (see event handler CreatePageStream);
If you need to implement custom image preview stream disposing you have to pass additional argument ReleasePageStream to clean up resources.
Specify PreviewFormat - PNG / JPG / BMP, and other properties like PageNumbers for which you want to generate preview. Additionaly for most of documents you can use specific PreviewOptions overloads, like PdfPreviewOptions, SpreadsheetPreviewOptions which allows to configure the resolution for the generated images in dots per inch.
Call method GeneratePreview method of the Watermarker object and pass PreviewOptions to it.