Hi, I'm having the following problem. When calling
pdfProvider.Export(document, stream);
where pdfProvider is PdfFormatProvider and document is RadFlowDocument, I sometimes get an Illegal Path exception with this stack trace:
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetExtension(String path)
at Telerik.Windows.Documents.Media.UriImageSource.UpdateExtensionFromUri()
at Telerik.Windows.Documents.Media.UriImageSource.GetImageData()
at Telerik.Windows.Documents.Media.UriImageSource.get_Data()
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExportContext.GetImageSource(ImageSource imageSource)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportImageInline(ImageInline imageInline, Block block)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportInline(RadFixedDocumentEditor editor, InlineBase inline, Block block)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportInlines(RadFixedDocumentEditor editor, Paragraph paragraph, Block block)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportParagraph(RadFixedDocumentEditor editor, Paragraph paragraph, Paragraph nextParagraph, Boolean isFirstBlockInContainer)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportBlock(RadFixedDocumentEditor editor, BlockBase block, BlockBase nextBlock, Boolean isFirstBlockInContainer)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.<ExportBlockContainer>d__5.MoveNext()
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportSection(Section section, RadFixedDocumentEditor editor)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportDocument(RadFlowDocument document, RadFixedDocumentEditor editor)
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.Export()
at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
at LS.TMMsgViewer.Services.PdfGenerator.ExportToStream(Stream stream) in C:\ls\pvminiserver\LS.TMMsgViewer\Services\PdfGenerator.cs:line 63
The HTML contains this fragment, I suspect the URL in the "src" attribute is what's causing the problem:
<p class=MsoNormal>
<img border=0 width=1 height=1 id="_x0000_i1033" src="https://t.myvisualiq.net/sync?prid=Test&ao=0&red=https://ad.doubleclick.net/ddm/trackimp/N7121.2426714VISUALIQ0/B20904629.217713024;dc_trk_aid=415907722;dc_trk_cid=99313089;ord=%20180907151105;u=25_CE_35_NFA180907|VIQ_$%7bUUID%7d|;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?" alt=Advertisement>
<o:p></o:p>
</p>
Is there a setting to ignore malformed URLs (instead of crashing)?
Thanks.