RtfSaveOptionsSaveImagesAsWmf Property

When true all images will be saved as WMF.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.11.0


public bool SaveImagesAsWmf { get; set; }

Property Value

Type: Boolean


This option might help to avoid WordPad warning messages.


Shows how to save all images as Wmf when saving to the Rtf document.
// Open a document that contains images in the jpeg format
Document doc = new Document(MyDir + "Images.docx");

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
Shape shapeWithJpg = (Shape)shapes[0];
Assert.AreEqual(ImageType.Jpeg, shapeWithJpg.ImageData.ImageType);

RtfSaveOptions rtfSaveOptions = new RtfSaveOptions();
rtfSaveOptions.SaveImagesAsWmf = true;
doc.Save(ArtifactsDir + "RtfSaveOptions.SaveImagesAsWmf.rtf", rtfSaveOptions);

ExpandedSee Also