DownsampleOptions Class
Wordize.Saving.DownsampleOptions class. Allows to specify downsample options.
DownsampleOptions class
Allows to specify downsample options.
public class DownsampleOptions
Properties
Name | Description |
---|---|
DownsampleImages { get; set; } | Specifies whether images should be downsampled. |
Resolution { get; set; } | Specifies the resolution in pixels per inch which the images should be downsampled to. |
ResolutionThreshold { get; set; } | 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. |
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
- namespace Wordize.Saving
- assembly Wordize