Hi Christina,
- If ImagesFolderAlias is not an empty string, then the image URI written to XAML will be ImagesFolderAlias + .
- If ImagesFolderAlias is an empty string, then the image URI written to XAML will be ImagesFolder + .
- If ImagesFolderAlias is set to ‘.’ (dot), then the image file name will be written to XAML without path regardless of other options.
Document doc = new
Document(MyDir + “in.html”);<o:p></o:p>
XamlFlowSaveOptions opt = new XamlFlowSaveOptions(SaveFormat.XamlFlow);
opt.ImagesFolderAlias = "http://www.aspose.com/";
opt.ImageSavingCallback = new ImageSavingCallback();
doc.Save(MyDir + "out.xaml", opt);
public class ImageSavingCallback : IImageSavingCallback
{
public void ImageSaving(ImageSavingArgs args)
{
// Since we are referencing an existing image on an external site we don’t need to save the image to disk. Instead set the image to be saved to a stream and dispose of it.
args.ImageStream = new MemoryStream();
args.KeepImageStreamOpen = false;
}
}
Thanks a lot, that´s perfect! I will try it out.
Hi Christina,