locked
C#/ASP.NET creating presentable invoice in pdf RRS feed

  • Question

  • User2127544842 posted

    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
    Address: Missouri
    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.

    Sincerely,
    Farman Shah.

    Saturday, March 5, 2011 7:42 AM

All replies