RtfSaveOptionsSaveImagesAsWmf Property

When true all images will be saved as WMF.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool SaveImagesAsWmf { get; set; }

Property Value

Type: Boolean
Remarks
This option might help to avoid WordPad warning messages.
Examples
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);

doc = new Document(ArtifactsDir + "RtfSaveOptions.SaveImagesAsWmf.rtf");

shapes = doc.GetChildNodes(NodeType.Shape, true);
Shape shapeWithWmf = (Shape)shapes[0];
Assert.AreEqual(ImageType.Wmf, shapeWithWmf.ImageData.ImageType);
See Also