A possible workaround could be to remove the image with the invalid Uri from the
RadFlowDocument before export:
foreach (ImageInline image in document.EnumerateChildrenOfType<ImageInline>().ToList())
{
UriImageSource uriImageSource = (UriImageSource)image.Image.ImageSource;
if (uriImageSource != null && !IsValid(uriImageSource.Uri.OriginalString))
{
image.Paragraph.Inlines.Remove(image);
}
}
private static bool IsValid(string uri)
{
try
{
Path.GetExtension(uri);
}
catch (ArgumentException)
{
return false;
}
return true;
}