Hi ,
Thanks a lot for your reply, But the output is generated by a JSP ( calling the methods of the Java Bean-business logic ) so.. i have to import the required packages in my JSP. SInce my web application is developed using the MVC structure, i have my JSP, handling the output ( hmm.. not the servlet ),
One more interesting thing is, as i hav said i tried a few examples, in that i did create a jsp page ( with <HTML> tag and all ; also imported the packages...though not called the methods of the package !!), and GOOD it was running fine and generated the required PDF on the fly.. ; Fortunately it hasnt got damaged.. hmm.. BUT when i call the methods ; and i go thru the sequence (input-to servlet-to-javabean -to JSP ) i dunno finally i get a damaged file... but i can call on the same page from cache memory and it doesnt giv any problem then.... !!
SO is there a way in which i can generate a pdf from the output jsp, by importing the required packages and by not damaging the pdf file.. when i call the methods..
( I didnt hav any problem by calling on the JSP directly, which doesnt call the javaBean methods, but imports packages and has <HTML> )
If possible , please let me know. I wud b very happy and appreciative.
Unfortunately, this pdf conversion, i was asked to do on a project ( web application)created by another group. So I guess my director wud not want me to change and mess up with the whole code.. ( maybe just working on the JSP output wud b appreciated..to get the pdf format)
Is it possible, If no other option, then ....
Thanks
prashant
Bruno <[EMAIL PROTECTED]>wrote:
A PDF file that begins with:
>
>
IS AN HTML FILE, NOT A PDF FILE!!!!!!!!
> <%@ page import="java.io.*" %>
> <%@ page import="java.util.*" %>
> <%@ page import="com.lowagie.text.*" %>
> <%@ page import="com.lowagie.text.pdf.*" %>
In the 4 lines above, you have 4 newlines damaging the PDF-file.
Please do not use JSP to generate PDF.
Every manual or handbook says you should use Servlets to generate
binary data, NOT JSPs.
Bruno
-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer Technology!
Open Source & Linux Developers, register now for the AMD Developer
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you Yahoo!?
Yahoo! News - Today's headlines
