DownsampleOptionsResolution Property |
Namespace: Aspose.Words.Saving
// Open a document that contains images Document doc = new Document(MyDir + "Rendering.docx"); // If we want to convert the document to .pdf, we can use a SaveOptions implementation to customize the saving process PdfSaveOptions options = new PdfSaveOptions(); // This conversion will downsample images by default Assert.True(options.DownsampleOptions.DownsampleImages); Assert.AreEqual(220, options.DownsampleOptions.Resolution); // We can set the output resolution to a different value // The first two images in the input document will be affected by this options.DownsampleOptions.Resolution = 36; // We can set a minimum threshold for downsampling // This value will prevent the second image in the input document from being downsampled options.DownsampleOptions.ResolutionThreshold = 128; doc.Save(ArtifactsDir + "Document.DownsampleOptions.pdf", options);