I am using Spire.Office (v5.2.0). I am trying the below HTML content to be presented into PowerPoint
<HTML><BODY><div><img src='155-200x200.jpg' /><p>The tool is used automate the process, improve coordination and communication, increase visibility, and reduce human effort. The key features of tool are:<br /><ul><li>Automatically identifies tasks ready to be executed</li><li>Cutover plan management in MS project with built-in sync</li><li>Automatically notifies task readiness for team members</li><li>Built-in security in accordance with internal audit</li><li>Scalable reporting</li></ul></p><table width='0' class='mce-item-table'><tbody><tr><td><b>D-DASH Team</b></td><td>Email: <a href='mailto:team@mail.com'>team@mail.com</a></td></tr><tr><td><b>Person</b></td><td>Managing Director<br />Email: <a href='mailto:team@mail.com'>team@mail.com</a></td></tr></tbody></table></div></BODY></HTML>
Code:
Presentation ppt = new Presentation();
ShapeList shapes = ppt.Slides[0].Shapes;
shapes.AddFromHtml(htmlString);
ppt.SaveToFile(outputFilename, FileFormat.Pptx2013);
The line 'shapes.AddFromHtml(htmlString)' is throwing the following expectation:
System.ArgumentException
HResult=0x80070057
Message=An item with the same key has already been added. Key: td:0|1
Source=System.Private.CoreLib
StackTrace:
at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException[T](T key)
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at spr䚷.ᜂ(ArrayList A_0, Char[] A_1)
at spr䚷.ᜃ(Char[] A_0, Int32 A_1, Int32 A_2)
at Spire.Presentation.Collections.ShapeList.ᜀ(String A_0, spr䚴 A_1, String A_2)
at Spire.Presentation.Collections.ShapeList.AddFromHtml(String htmlText)
at EmbedHtmlString.AppendHtmlString.CreatePPTWithImage(String htmlString, String outputFilename) in D:\02-SourceCode\EmbedHtmlString\EmbedHtmlString\AppendHtmlString.cs:line 24
at Program.<Main>$(String[] args) in D:\02-SourceCode\EmbedHtmlString\EmbedHtmlString\Program.cs:line 13
Can you please look into this and what is the reason for this exception. Thank you in advance.