Hi everyone,
I have a problem when I draw a PdfTextElement on a Rectangle which height is smaller than the text.
It does not throw any error bug but it never exits the drawing function.
It goes like this :
PdfTextElement text = new PdfTextElement();
text.Font = new PdfTrueTypeFont(new Font("Arial", 10.0F, FontStyle.Regular));
textFormat = new PdfStringFormat
{
Alignment = PdfTextAlignment.Right,
LineAlignment = PdfVerticalAlignment.Middle,
WordWrap = PdfWordWrapType.Word
};
text.StringFormat = textFormat;
text.Brush = new PdfSolidBrush(Color.Red);
text.Text = "foo";
RectangleF rect = new RectangleF(5, 5, 20, 5); //where the height is smaller than the text
text.Draw(currentPdfPage, rect, new PdfLayoutFormat { Break = PdfLayoutBreakType.FitPage, Layout = PdfLayoutType.OnePage });
Thanks
PS: I'm on version 15.2451.0.40