I am designing a program that users can print a card verse for various sizes of greetings cards.
This involves choosing the verse from a list on a database selecting the correct parameters (Card size, Font, font size etc).
I have had this running on a website for some years, but now I want to design a stand-alone version.
Below is attached an example of what I want to acheive (verse (2).jpg).
Also I have attached a diagram of the information I store in a database to position the text (C-Size-Diag.jpg)
I have experimented with the 'Hello World' VB code and changed it to what I thought would position the text, but it does not work as I anticipated.
In the following line I thought that the text would fit within the rectangle, but it doesn't?
Code:
gfx.DrawString(text, font, XBrushes.Black, New XRect(170 * 2.5, 60 * 2.5, cellw, cellh), XStringFormats.Center)
It spreads across the page (if the text is long enough)?
Am I understanding the code wrongly?
If so, how do I get the text to print within the box?
Also, can you force the text to CR/LF where you wish it to?
If the PDFsharp can't do what I wish then I will abandon trying to use this code.