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(file_name=MY_DIR + 'Rendering.docx')
builder = aw.DocumentBuilder(doc=doc)
builder.font.size = 60
builder.writeln('Some text.')
options = aw.saving.ImageSaveOptions(aw.SaveFormat.JPEG)
doc.save(file_name=ARTIFACTS_DIR + 'Document.ImageSaveOptions.Default.jpg', save_options=options)
options.use_anti_aliasing = True
options.use_high_quality_rendering = True
doc.save(file_name=ARTIFACTS_DIR + 'Document.ImageSaveOptions.HighQuality.jpg', save_options=options)

See Also