Here is the C# and HTML copied from Word and pasted over for rendering in PDF which caused a failure. The HTML would render in PDF once the nested font tags, being direct children of an un-ordered list element, were removed
Granted that’s not properly formatted HTML but when copying from Word over to PDF there should be some Word Format Scrubbing involved somehow. The code should survive this.
C#
public void TestHTMLFail(Page page) {
var testFail = (html from the first paragraph tag to the closing unorderedlist tag here. It will render if I paste it)
AddLineHtml(page, testFail, false);
}
Add Line HTML Method
protected static void AddLineHtml(Page page, string text, bool addSpace = true, int fontSize = 11)
{
var fragment = GetHtmlFragment(text);
SetSize(fragment, fontSize);
page.Paragraphs.Add(fragment);
if (addSpace) page.Paragraphs.Add(SetSize(new TextFragment { Text = “” }, 10));
}
HTML
<p> <br> </p> <p> <span> The existing structure was built in 1953 and is a 5 span, steel truss structure with a total length of 828 feet and a bridge deck width of 26 feet. <span> </span> The existing structure has a reinforced concrete deck for four spans and an asphalt wearing course over steel decking for the swing span. <span> </span> The existing piers are stone with concrete caps while the existing abutments are concrete. </span> </p> <p> <span> Previous structures at this location, included: a covered bridge (1875), rebuilt after flood damage (1884) and, swing span (added in 1896); and a Pratt truss with swing span after the 1913 flood. These bridges featured the extant stone piers and concrete pivot pier. The original stone piers and concrete pivot pier were modified in 1953 by the addition of caps which raised the height of the bridge. In summary, remnants of the 1875 covered bridge (stone piers) and remnants of the 1896 and 1913 swing spans (concrete pivot) were incorporated into the 1953 bridge design. The 1953 bridge featured new deck, trusses, mechanicals and swing span. </span> </p> <p> <span> <span> <span> <font> <span> </span> </font> </span> </span> </span> </p> <ul> <font> </font> <li> <font> </font> <div> <font> <span> </span> <span> Detailed information regarding existing bridge conditions can be found in the Feasibility Study (E. L. Robinson; January 2016) located in the project file under <i>Alternatives/Reports</i> </span> </font> </div> </li> </ul>