DownsampleOptions.ResolutionThreshold
DownsampleOptions ResolutionThreshold property. Specifies the threshold resolution in pixels per inch. If resolution of an image in the document is less than threshold value the downsampling algorithm will not be applied. A value of 0 means the threshold check is not used and all images that can be reduced in size are downsampled.
DownsampleOptions.ResolutionThreshold property
Specifies the threshold resolution in pixels per inch. If resolution of an image in the document is less than threshold value, the downsampling algorithm will not be applied. A value of 0 means the threshold check is not used and all images that can be reduced in size are downsampled.
public int ResolutionThreshold { get; set; }
Remarks
The default value is 0.
Examples
Shows how to configure images downsample options.
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// Set the "Resolution" property to "36" to downsample all images to 36 ppi.
pdfSaveOptions.DownsampleOptions.Resolution = 36;
// Set the "ResolutionThreshold" property to only apply the downsampling to
// images with a resolution that is above 128 ppi.
pdfSaveOptions.DownsampleOptions.ResolutionThreshold = 128;
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "DownsampleOptions.pdf", pdfSaveOptions)
.Execute();
See Also
- class DownsampleOptions
- namespace Wordize.Saving
- assembly Wordize