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:
<blink>
First Name: John Marshal
Address: Missouri
Street: Honolulu 23rd
</blink>
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.
Use a table.
See this blog post: http://www.mikesdotnetting.com/Article/86/iTextSharp-Introducing-Tables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With