GroupDocs.Redaction for .NET 20.11 Release Notes

Major Features

There are the following improvements in this release:

  • Improve PDF preview generation

Full List of Issues Covering all Changes in this Release

REDACTIONNET-331Improve PDF preview generationImprovement

Public API and Backward Incompatible Changes

Improve PDF preview generation

This feature contains improvements for PDF preview rendering and embedded images redactions.

Public API changes

Interface IPreviewable providing methods for getting a general document information and previews has been added.
Class Redactor now implements interface IPreviewable.


The following example demonstrates how to get a single page preview of the document.


// Take preview of the first page
int testPageNumber = 1;
// Preview file name
string previewFileName = string.Format("{0}_page{1}.png", "D:\\sample.pdf", testPageNumber);
// Load the document to generate preview
using (Redactor redactor = new Redactor("D:\\sample.pdf"))
    PreviewOptions options = new PreviewOptions(delegate(int pageNumber) 
        return File.OpenWrite(previewFileName); 
    options.Width = 480;
    options.Height = 640;
    options.PageNumbers = new int[] { testPageNumber };
    options.PreviewFormat = PreviewOptions.PreviewFormats.PNG;
    Console.WriteLine("\nPreview for page: {0} was saved to \"{1}\"", testPageNumber, previewFileName);

© Aspose Pty Ltd 2001-2022. All Rights Reserved.