Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Saving .jsp page as .pdf file while generating report for struts based web application

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Saving .jsp page as .pdf file while generating report for struts based web application

    i am using struts based web application my report is generated in
    jsp page with some picture
    i wand to save this report as pdf file on server machine
    so plz immidiatly send the help;
    thanks in advance


  2. #2
    Banned
    Join Date
    May 2008
    Posts
    25
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: how to save jsp page as pdf file

    There are free java to pdf libraries available here: iText, a Free Java-PDF Library: Home Page

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to save jsp page as pdf file

    thanks for guide i have used iText but problem are remain same
    i am unable to set background of pdf file using itext and when i want to
    insert picture on pdf using

    Image image = Image.getInstance ("images/logo.png");
    document.add(new Paragraph("Roseindia"));
    document.add(image);

    it gives
    ExceptionConverter: java.io.IOException: The document has no pages. at com.lowagie.text.pdf.PdfPages.writePageTree(Unknow n Source) at com.lowagie.text.pdf.PdfWriter.close(Unknown Source) at com.lowagie.text.pdf.PdfDocument.close(Unknown Source) at com.lowagie.text.Document.close(Unknown Source)
    so plz reply for setting background of pdf and inserting picture on pdf
    with regards
    ravindra

  4. #4
    Senior Member
    Join Date
    May 2008
    Posts
    19
    Thanks
    0
    Thanked 9 Times in 4 Posts

    Default Re: how to save jsp page as pdf file

    Take a look at this link.

    iText Tutorial: Images

Similar Threads

  1. Java program to open jsp page on client side instead of server side
    By khanshakil in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: July 8th, 2009, 06:26 AM
  2. Replies: 1
    Last Post: April 20th, 2009, 11:17 AM