Last post Jun 01, 2011 04:01 PM by smirnov
Mar 05, 2011 07:42 AM|farmanshah|LINK
I want to create a pdf for invoice, I have used iTextSharp's DLL, and I am able to create a pdf successfully.
I am using Visual C#.NET with ASP.NET.
The problem is that, I want to put the Information Heading on the left side and then the concerned information regarding that information heading on the right side. For example:-
First Name: John Marshal
Street: Honolulu 23rd
Here I refer to "First Name, Address, Street" as Information Heading and "John Marshal, Missouri, Honolulu 23rd" as information.
Is there any solution to place all this stuff aligned, so that the invoice becomes presentable and meaningful as well.
Although I have used the spaces to create this formatting as shown below:-
document.Add(new Paragraph(" CROWN SERVICE LIMITED", new Font(Font.BOLD, 25)));
document.Add(new Paragraph (" John Marshal ", new Font(Font.BOLD, 20)));
document.Add(new Paragraph (" Missouri Honolulu 23rd", new Font(Font.BOLD, 20)));
Although I have tried to use an image in the background of pdf, but it still doesn't seem appropriate.
I think there can be some resolution through converting the data into an XML, if it is possible, please let me know.
Please help me in this regards.
Jun 01, 2011 04:01 PM|smirnov|LINK
1. You can add a table with 2 cells, format width for first cell and put text in to the second cell.
2. You can use columns: http://www.mikesdotnetting.com/Article/89/iTextSharp-Page-Layout-with-Columns