# Get document page preview This article shows the implementation of Redactor class which supports the rendering of the document preview in JPEG, PNG and BMP. In GroupDocs.Redaction, [Redactor](https://reference.groupdocs.com/redaction/net/groupdocs.redaction/redactor) class supports rendering of the document preview in on of these image formats: * JPEG Image * Portable Network Graphics (PNG) * Bitmap Image File (BMP) The following example demonstrates how to get a single page preview of the document. ```csharp // Take preview of the first page int testPageNumber = 1; // Preview file name string previewFileName = string.Format("{0}_page{1}.png", "D:\\sample.docx", testPageNumber); // Load the document to generate preview using (Redactor redactor = new Redactor("D:\\sample.docx")) { 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; redactor.GeneratePreview(options); Console.WriteLine("\nPreview for page {0} was saved to \"{1}\"", testPageNumber, previewFileName); } ```