When you load a HTML file where the image is not loaded properly and you try to export RadRichTextEditor's document to a pdf, an error occurs.
Workaround:
If the image doesn't exist you can skip loading in the document. Thus, exporting to pod at a later moment won't produce an error. You can use the HtmlImportSettings.LoadImageFromUrl event and handle the image loading:
Sub New()
' This call is required by the designer.
InitializeComponent()
Dim provider As HtmlFormatProvider = New HtmlFormatProvider()
Dim htmlImportSettings As HtmlImportSettings = New HtmlImportSettings()
AddHandler htmlImportSettings.LoadImageFromUrl, AddressOf LoadImageFromUrl
provider.ImportSettings = htmlImportSettings
Using inputStream As FileStream = File.OpenRead("..\..\Email HTML.html")
Me.RadRichTextEditor1.Document = provider.Import(inputStream)
End Using
End Sub
Private Sub LoadImageFromUrl(sender As Object, e As LoadImageEventArgs)
e.Handled = True
End Sub