erdomke / RtfPipe

Library for processing rich-text format (RTF) streams
MIT License
123 stars 45 forks source link

Exception: A null reference or invalid value was found [GDI+ status: InvalidParameter] #80

Open vmato opened 1 year ago

vmato commented 1 year ago

Looks like a problem with images:

System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x00098] in <c9ab56050cf24ed398ac1ab62053be20>:0 
  at System.Drawing.Image.Save (System.IO.Stream stream, System.Drawing.Imaging.ImageCodecInfo encoder, System.Drawing.Imaging.EncoderParameters encoderParams) [0x0008f] in <c9ab56050cf24ed398ac1ab62053be20>:0 
  at System.Drawing.Image.Save (System.IO.Stream stream, System.Drawing.Imaging.ImageFormat format) [0x0002f] in <c9ab56050cf24ed398ac1ab62053be20>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Image.Save(System.IO.Stream,System.Drawing.Imaging.ImageFormat)
  at RtfPipe.RtfHtmlSettings.DataUri (RtfPipe.Picture picture) [0x00038] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Picture image) [0x00012] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Picture.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.Element element) [0x003b5] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.Element.Visit (RtfPipe.Model.INodeVisitor visitor) [0x00000] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Model.HtmlVisitor.Visit (RtfPipe.Model.RtfHtml document) [0x00531] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Rtf.ToHtml (RtfPipe.RtfSource source, System.Xml.XmlWriter writer, RtfPipe.RtfHtmlSettings settings) [0x00050] in <c97495b35d87401888361e7d9a7c622c>:0 
  at RtfPipe.Rtf.ToHtml (RtfPipe.RtfSource source, RtfPipe.RtfHtmlSettings settings) [0x0000e] in <c97495b35d87401888361e7d9a7c622c>:0 
vmato commented 1 year ago

sample.zip