PreviewOptions

PreviewOptions class

Specifies options for generating page previews of a document by DocumentAssembler.GeneratePreview.

public class PreviewOptions

Constructors

Name Description
PreviewOptions(CreatePageStream) Creates a new instance of this class.
PreviewOptions(CreatePageStream, ReleasePageStream) Creates a new instance of this class.

Properties

Name Description
CreatePageStream { get; set; } Gets or sets a method creating a stream to write a page preview image to.
Height { get; set; } Gets or sets the height of page preview images, in pixels. The default value is 0.
PageNumbers { get; set; } Gets or sets 1-based numbers of pages to preview. The default value is null meaning all pages.
PreviewFormat { get; set; } Gets or sets the image format of page previews. PNG is the default.
ReleasePageStream { get; set; } Gets or sets a method releasing a stream a page preview image was written to. The default value is null.
Resolution { get; set; } Gets or sets the resolution of page preview images, in dots per inch. The default value is 96.
Width { get; set; } Gets or sets the width of page preview images, in pixels. The default value is 0.

Remarks

A preview is a set of images, one per page of a document: a page of a word processing document, a printed page of a spreadsheet, a slide of a presentation, or a page of an email message rendered as a document.

For every previewed page, CreatePageStream is called to get a stream to write the page image to. After the image is written, ReleasePageStream is called, if specified, so that the stream can be closed or processed. Streams are not closed by GroupDocs.Assembly.

See Also