Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
PDF not keeping all formatting
posted

I'm generating a PDF document using the Infragistics.Documents.Report.Report object.
I’m pulling my HTML text from the WebHtmlEditor control and including in my PDF document.  Some text attributes convert, and others do not.  Specifically I’m needing to get a bulleted list to show in my PDF document.

I use the following code to add the text to the object:

// Background text.
Infragistics.Documents.Report.Text.IText text = band.AddText();
text.AddLineBreak();
text.AddLineBreak();
text.Style = normalStyle;
text.AddRichContent(pi.Content.BackgroundInformation);

Where BackgroundInformation is a string and has been set to the following value:

<P>Testing with some text:</P>
<UL>
<LI>Item 1</LI>
<LI>Item 2</LI>
<LI>Item 3</LI></UL>
<P>The end of the three items.</P>

But my generated PDF shows text as:

Testing with some text: Item 1 Item 2 Item 3
The end of the three items.

What am I doing wrong?