MetafileRenderingOptions.EmulateRenderingToSizeOnPageResolution

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

MetafileRenderingOptions.EmulateRenderingToSizeOnPageResolution property

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; }

Remarks

This option is used only when 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.

Examples

Shows how to configure metafile rendering.

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();

// Set the "EmulateRasterOperations" property to "false" to fall back to bitmap when
// it encounters a metafile, which will require raster operations to render in the output PDF.
pdfSaveOptions.MetafileRenderingOptions.EmulateRasterOperations = false;

// Set the "RenderingMode" property to "VectorWithFallback" to try to render every metafile using vector graphics.
pdfSaveOptions.MetafileRenderingOptions.RenderingMode = MetafileRenderingMode.VectorWithFallback;

// Set the "EmfPlusDualRenderingMode" property to "EmfPlusDualRenderingMode.Emf"
// to only render the EMF part of an EMF+ dual metafile.
pdfSaveOptions.MetafileRenderingOptions.EmfPlusDualRenderingMode = MetafileEmfPlusDualRenderingMode.Emf;

// Set the "UseEmfEmbeddedToWmf" property to "true" to render embedded EMF data
// for metafiles that we can render as vector graphics.
pdfSaveOptions.MetafileRenderingOptions.UseEmfEmbeddedToWmf = true;

// Set the "EmulateRenderingToSizeOnPage" property to "false" to emulate metafile rendering to its default size in pixels.
pdfSaveOptions.MetafileRenderingOptions.EmulateRenderingToSizeOnPage = false;
pdfSaveOptions.MetafileRenderingOptions.EmulateRenderingToSizeOnPageResolution = 50;

// Wordize uses GDI+ for raster operations emulation, when value is set to true.
pdfSaveOptions.MetafileRenderingOptions.UseGdiRasterOperationsEmulation = true;

Converter.Create()
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "FixedPageSaveOptions.MetafileRenderingOptions.pdf", pdfSaveOptions)
    .Execute();

See Also