1 Reply Latest reply on Aug 22, 2003 3:21 PM by Matthias Gaertner

    Want some help using itext  pdf generator and  jboss

    naveenkumarg1 Newbie

      Hi,

      Iam using Jboss with embeded tomcat.I downloaded itext now i want to use itext to generate a report in pdf format using jsp and jboss.How can i do this can some one give me the steps to do it

      thanks

      naveen
      naveen@fict2u.com

        • 1. Re: Want some help using itext  pdf generator and  jboss
          Matthias Gaertner Newbie

          Create a servlet to output the PDF stream to the client.
          Map this servlet to some name that ends in ".pdf".
          Set the Content-Disposition HTTP Header.
          Set the Mime Type to "application/pdf".

          As to iText: I have found it to be most convenient to read a template PDF file via getResourceAsStream("/WEB-INF/res/template.pdf") and then have iText just fill in the blanks.

          This way, you can use your word-processor-du-jour to create a nice-looking PDF (template) without coding every image, line, text block ...

          Regards, Matthias