Set resolution of document preview.

On this page

GroupDocs.Annotation v21.5 and later allows you to set resolution of the document’s preview. By default, it is 96 points per inch. Set the Resolution property of the PreviewOptions class to change the resolution.

The following code snippets shows how to set preview resolution to 144 PPI:

using (Annotator annotator = new Annotator("input.pdf"))
    PreviewOptions previewOptions = new PreviewOptions(pageNumber =>
        var pagePath = $"result_{pageNumber}.png";
        return File.Create(pagePath);
        // Set resolution
        Resolution = 144


On this page