I'm working on a C# project using iTextSharp for various reports. I use one class to pull data from an order and then another class to display the data on the report. I'm pulling the note data (a string) from a separate class, using the loop below:
for (int i = 0; i < ovNotes.Length; i++)
{
OVData.orderNotes += StripHTML(ovNotes[i].HTML);
}
ovNotes is a string, and so its OVData.orderNotes
The StripHTML method does exactly what it says, removes all the <p>,<br />
etc tags that appear in the ovNotes
Next, in the actual class to display all the information:
Phrase orderNotes = this.FormatPhrase(xOVData.orderNotes);
ColumnText.ShowTextAligned(instance.DirectContent, 0, orderNotes, 36f, 440f, 0f);
This formats the order notes to give them a consistent font, font size, etc. However, when the code runs, the order notes do not appear. When I substitute orderNotes with a made up phrase it displays fine, with no other code changed.
Phrase orderNotes = this.FormatPhrase(xOVData.orderNotes);
phrase testPhrase = this.FormatPhrase("This is a test");
ColumnText.ShowTextAligned(instance.DirectContent, 0, testPhrase, 36f, 440f, 0f);
/* Desired (and correct) output
* NOTES:
* This is a test
*/
The Phrase orderNotes contains all of the notes from xOVdata.OrderNotes, but for whatever reason it refuses to display. I did notice, however, that the orderNotes also contain all of the   that the original notes had, as the StripHTML method doesn't remove those. I've looked around and the only results I found were issues with other (human) languages, or using iTextSharp to edit an existing PDF.
What could be preventing the imported string from displaying properly, especially when it contains all the correct data in the line directly above the ColumnText.ShowText...?