I'm working on taking the text of a letter and creating a simple pdf.
The text goes something like this:
"I would like to take this opportunity to thank you for your generous contribution of $500.00."
Now, when the pdf is created, the currency symbol "$" is at the end of the line, and the "500.00" comes up on the start of the following line.
Here is the code that demonstrates the issue. Any help is greatly appreciated.
Dim doc As New PdfDocument
Dim page As PdfPageBase = doc.Pages.Add
Dim letterWidth As Single = 468
Dim letterHeight As Single = 468
Dim LetterText as String = "I would like to take this opportunity to thank you for your generous contribution of $500.00."
Dim font As New System.Drawing.Font("Calibri", 12, FontStyle.Regular)
Dim ttf As New PdfTrueTypeFont(font, True)
Dim brush As New PdfSolidBrush(Color.Black)
Dim format As New PdfStringFormat
format.LineSpacing = 12
format.ParagraphIndent = 36
Dim textLayout As New PdfTextLayout
textLayout.Break = PdfLayoutBreakType.FitPage
textLayout.Layout = PdfLayoutType.OnePage
Dim textWidget As New PdfTextWidget(LetterText, ttf, brush)
textWidget.StringFormat = format
Dim bounds As New Rectangle(x, y, letterWidth, letterHeight)
textWidget.Draw(page, bounds, textLayout)
doc.SaveToFile(PdfDest)
doc.Close()