use_anti_aliasing property
SaveOptions.use_anti_aliasing property
Gets or sets a value determining whether or not to use anti-aliasing for rendering.
@property
def use_anti_aliasing(self) -> bool:
...
@use_anti_aliasing.setter
def use_anti_aliasing(self, value: bool):
...
Remarks
The default value is False
. When this value is set to True
anti-aliasing is
used for rendering.
This property is used when the document is exported to the following formats: SaveFormat.TIFF, SaveFormat.PNG, SaveFormat.BMP, SaveFormat.JPEG, SaveFormat.EMF. When the document is exported to the SaveFormat.HTML, SaveFormat.MHTML, SaveFormat.EPUB, SaveFormat.AZW3 or SaveFormat.MOBI formats this option is used for raster images.
Examples
Shows how to improve the quality of a rendered document with SaveOptions.
doc = aw.Document(MY_DIR + "Rendering.docx")
builder = aw.DocumentBuilder(doc)
builder.font.size = 60
builder.writeln("Some text.")
options = aw.saving.ImageSaveOptions(aw.SaveFormat.JPEG)
doc.save(ARTIFACTS_DIR + "Document.image_save_options.default.jpg", options)
options.use_anti_aliasing = True
options.use_high_quality_rendering = True
doc.save(ARTIFACTS_DIR + "Document.image_save_options.high_quality.jpg", options)
See Also
- module aspose.words.saving
- class SaveOptions