Class MetafileRenderingOptions

Class MetafileRenderingOptions

Namespace: Aspose.Words.Saving
Assembly: Aspose.Words.dll (25.3.0)

Allows to specify additional metafile rendering options.

To learn more, visit the Handling Windows Metafiles documentation article.

public class MetafileRenderingOptions

Inheritance

objectMetafileRenderingOptions

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

MetafileRenderingOptions()

public MetafileRenderingOptions()

Properties

EmfPlusDualRenderingMode

Gets or sets a value determining how EMF+ Dual metafiles should be rendered.

public EmfPlusDualRenderingMode EmfPlusDualRenderingMode { get; set; }

Property Value

EmfPlusDualRenderingMode

Remarks

EMF+ Dual metafiles contains both EMF+ and EMF parts. MS Word and GDI+ always renders EMF+ part. Aspose.Words currently doesn't fully supports all EMF+ records and in some cases rendering result of EMF part looks better then rendering result of EMF+ part.

This option is used only when metafile is rendered as vector graphics. When metafile is rendered to bitmap, EMF+ part is always used.

The default value is Aspose.Words.Saving.EmfPlusDualRenderingMode.EmfPlusWithFallback.

EmulateRasterOperations

Gets or sets a value determining whether or not the raster operations should be emulated.

public bool EmulateRasterOperations { get; set; }

Property Value

bool

Remarks

Specific raster operations could be used in metafiles. They can not be rendered directly to vector graphics. Emulating raster operations requires partial rasterization of the resulting vector graphics which may affect the metafile rendering performance.

When this value is set to true, Aspose.Words emulates the raster operations. The resulting output maybe partially rasterized and performance might be slower.

When this value is set to false, Aspose.Words does not emulate the raster operations. When Aspose.Words encounters a raster operation in a metafile it fallbacks to rendering the metafile into a bitmap by using the operating system.

This option is used only when metafile is rendered as vector graphics.

The default value is true.

EmulateRenderingToSizeOnPage

Gets or sets a value determining whether metafile rendering emulates the display of the metafile according to the size on page or the display of the metafile in its default size.

public bool EmulateRenderingToSizeOnPage { get; set; }

Property Value

bool

Remarks

When metafiles are displayed in MS Word, some graphics may be scaled according to the actual metafile size in pixels. I.e. even zooming may affect the metafile display.

When this value is set to true, Aspose.Words emulates rendering according to the metafile size on page. The size in pixels is calculated from the metafile size on the page and the specified Aspose.Words.Saving.MetafileRenderingOptions.EmulateRenderingToSizeOnPageResolution.

When this value is set to false, Aspose.Words emulates metafile rendering to its default size in pixels.

This option is used only when metafile is rendered as vector graphics.

The default value is true.

EmulateRenderingToSizeOnPageResolution

Gets or sets the resolution in pixels per inch for the emulation of metafile rendering to the size on page.

public int EmulateRenderingToSizeOnPageResolution { get; set; }

Property Value

int

Remarks

This option is used only when Aspose.Words.Saving.MetafileRenderingOptions.EmulateRenderingToSizeOnPage is set to true.

The default value is 96. This is a default display resolution. I.e. metafile rendering will emulate the display of the metafile in MS Word with a 100% zoom factor.

RenderingMode

Gets or sets a value determining how metafile images should be rendered.

public MetafileRenderingMode RenderingMode { get; set; }

Property Value

MetafileRenderingMode

Remarks

The default value depends on the save format. For images it is Aspose.Words.Saving.MetafileRenderingMode.Bitmap. For other formats it is Aspose.Words.Saving.MetafileRenderingMode.VectorWithFallback.

UseEmfEmbeddedToWmf

Gets or sets a value determining how WMF metafiles with embedded EMF metafiles should be rendered.

public bool UseEmfEmbeddedToWmf { get; set; }

Property Value

bool

Remarks

WMF metafiles could contain embedded EMF data. MS Word in most cases uses embedded EMF data. GDI+ always uses WMF data.

When this value is set to true, Aspose.Words uses embedded EMF data when rendering.

When this value is set to false, Aspose.Words uses WMF data when rendering.

This option is used only when metafile is rendered as vector graphics. When metafile is rendered to bitmap, WMF data is always used.

The default value is true.

UseGdiRasterOperationsEmulation

Gets or sets a value determining whether or not to use the GDI+ for raster operations emulation.

public bool UseGdiRasterOperationsEmulation { get; set; }

Property Value

bool

Remarks

Windows GDI+ library could be used to emulate raster operations. It provides support for all raster operation comparing to Aspose.Words own emulation but performance may be slower in some cases.

When this value is set to true, Aspose.Words uses GDI+ for raster operations emulation.

When this value is set to false, Aspose.Words uses its own implementation of raster operations emulation.

This option is used only when metafile is rendered as vector graphics.

The default value is false.