I'm getting this error while trying to call Spire's LoadHTML(textReader, XHTMLValidationType.None);
StackTrace:
[code] at System.ThrowHelper.ThrowKeyNotFoundException[T](T key) in System\ThrowHelper.cs:line 217
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) in System.Collections.Generic\Dictionary.cs:line 694
at Spire.Doc.Table.蹖(Dictionary`2 A_0, Int32 A_1) in Spire.Doc\Table.cs:line 2597
at Spire.Doc.Table.辌() in Spire.Doc\Table.cs:line 2509
at Spire.Doc.Table.隱() in Spire.Doc\Table.cs:line 2623
at spr匘.輯() in -\spr匘.cs:line 5768
at spr匘.蹖(XmlNode A_0, 蹵 A_1, Table A_2) in -\spr匘.cs:line 9942
at spr匘.迩(XmlNode A_0) in -\spr匘.cs:line 9861
at spr匘.錏(XmlNode A_0) in -\spr匘.cs:line 4897
at spr匘.蹖(XmlNodeList A_0) in -\spr匘.cs:line 4240
at spr匘.⿏(IBody A_0, String A_1, Int32 A_2, Int32 A_3) in -\spr匘.cs:line 3467
at Spire.Doc.Body.蹖(String A_0, Int32 A_1, Int32 A_2, Int32 A_3) in Spire.Doc\Body.cs:line 186
at Spire.Doc.Document.蹖(TextReader A_0, XHTMLValidationType A_1, Int32 A_2) in Spire.Doc\Document.cs:line 4785
at Spire.Doc.Document.LoadHTML(TextReader reader, XHTMLValidationType validationType) in Spire.Doc\Document.cs:line 4770[/code]
Version: Spire.Doc 12.4.7 for .Net (using NuGet package)
Environment: Windows 10, .Net8.0, class library, English Canada
Code:
[code]
TextReader textReader = new StringReader(htmlString);
LoadSpireLicense();
var spireDocument = new Document();
spireDocument.LoadHTML(textReader, XHTMLValidationType.None);
[/code]
The exception happens on the last line. I have attached a file that gives the exception and one that doesn't. The only difference is that one has a line of CSS "width: 100%" and that fails and the other I replaced it with "width: 1920px" and that succeeds. This is only as a workaround for now.
Since I have tried several times to attach a file and paste the content in, but just get this:
[quote]Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.[/quote]
Please let me know how I can provide a sample to you. It is HTML.