MetafileRenderingOptions.EmulateRenderingToSizeOnPage
MetafileRenderingOptions.EmulateRenderingToSizeOnPage property
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; }
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
, Wordize 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 EmulateRenderingToSizeOnPageResolution
.
When this value is set to false
, Wordize 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
.
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
- class MetafileRenderingOptions
- namespace Wordize.Saving
- assembly Wordize