Unplanned
Last Updated: 05 Jan 2022 14:33 by ADMIN
Avrohom Yisroel
Created on: 05 Jan 2022 14:33
Category: WordsProcessing
Type: Bug Report
0
WordsProcessing: Importing html image with no source and then exporting it to pdf causes an exception

Importing html image with no source and then exporting it to pdf causes an exception, instead of omitting the faulty image.

Such images can be stripped using the following workaround:

List<ImageInline> images = this.document.EnumerateChildrenOfType<ImageInline>().ToList();

foreach (var image in images)
{
      if (image.Image.ImageSource == null)
      {
               image.Paragraph.Inlines.Remove(image);
      }
}

0 comments