EmfPlusDualRenderingMode enumeration

EmfPlusDualRenderingMode enumeration

Specifies how Aspose.Words should render EMF+ Dual metafiles.

Members

NameDescription
EMF_PLUS_WITH_FALLBACKAspose.Words tries to render EMF+ part of EMF+ Dual metafile. If some of the EMF+ records are not supported then Aspose.Words renders EMF part of EMF+ Dual metafile.
EMF_PLUSAspose.Words renders EMF+ part of EMF+ Dual metafile.
EMFAspose.Words renders EMF part of EMF+ Dual metafile.

Examples

Shows how to configure Enhanced Windows Metafile-related rendering options when saving to PDF.

doc = aw.Document(file_name=MY_DIR + 'EMF.docx')
# Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
# to modify how that method converts the document to .PDF.
save_options = aw.saving.PdfSaveOptions()
# Set the "EmfPlusDualRenderingMode" property to "EmfPlusDualRenderingMode.Emf"
# to only render the EMF part of an EMF+ dual metafile.
# Set the "EmfPlusDualRenderingMode" property to "EmfPlusDualRenderingMode.EmfPlus" to
# to render the EMF+ part of an EMF+ dual metafile.
# Set the "EmfPlusDualRenderingMode" property to "EmfPlusDualRenderingMode.EmfPlusWithFallback"
# to render the EMF+ part of an EMF+ dual metafile if all of the EMF+ records are supported.
# Otherwise, Aspose.Words will render the EMF part.
save_options.metafile_rendering_options.emf_plus_dual_rendering_mode = rendering_mode
# Set the "UseEmfEmbeddedToWmf" property to "true" to render embedded EMF data
# for metafiles that we can render as vector graphics.
save_options.metafile_rendering_options.use_emf_embedded_to_wmf = True
doc.save(file_name=ARTIFACTS_DIR + 'PdfSaveOptions.RenderMetafile.pdf', save_options=save_options)

See Also