PdfSharpCore
PdfSharpCore copied to clipboard
XTextFormatter : block.Text.Trim() can throw a NullReferenceException since 1.3.67
Hi,
In the DrawString method, if the string text parameter contains \r\n it will throw a NullReferenceException. The new code in XTextFormatter.cs L.231 does a block.Text.Trim() but the Text property is null when block.Type is BlockType.LineBreak.
There are maybe other cases where Text can be null but LineBreak is the first I've encountered.