This is a bit of a strange issue.. i hope i explain it well:
When appending html to a paragraph spire.doc is sticking the first <p> of the html at the bottom of the paragraph! It’s a bit hard to explain so ill let the code speak:
This is a sample of HTML:
<p ><span style="font-family: Book Antiqua;"><strong><span style="text-decoration: underline;">HISTORY:</span></strong> </span></p>
<p ><span style="font-family: Book Antiqua;"> </span></p>
<p ><span style="font-family: Book Antiqua;">His initial complaints included <span style='font-family:Times New Roman; font-size:12pt; font-weight: normal; font-style: normal; text-decoration: none; color: #000000; background-color: #FFFFFF;'>low back, left shoulder, right shoulder, left arm, right arm, left elbow and right elbow</span> pain.</span></p>
- Code: Select all
using(Document report = new Document())
{
Section rSection = report.AddSection();
report.Sections.Add(rSection);
rParagraph.AppendHTML(sectionText); // sectionText equals the html I pasted above //
rSection.Paragraphs.Add(rParagraph);
report.SaveToFile(reportFullPath);
}
So instead of showing:
HISTORY:
His initial complaints included low back, left shoulder, right shoulder, left arm, right arm, left elbow and right elbow pain.
Its showing like this:
His initial complaints included low back, left shoulder, right shoulder, left arm, right arm, left elbow and right elbow pain.
HISTORY:
Any idea??? Please help!
Thanks
Roy