RtfSaveOptionsSaveImagesAsWmf Property |
Namespace: Aspose.Words.Saving
// 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);