Hello,

I have created a pdf file with itext using a Java Servlet. When I call the
servlet, I open the file in the Web Browser. For that, I use the next code
in the Servlet class:

        res.setHeader("expires", "0");
        res.setContentType("application/pdf");
        res.setHeader("Pragma", "public");
        res.setHeader("Cache-Control", "must-revalidate, post-check=0,
pre-check=0");
        res.setHeader("max-age","0");
        res.setHeader("Content-Disposition","inline; filename="+ strArchivo
+ ".pdf");

However, when I save a copy of the pdf file, the name shown is not the
specified by strArchivo, but it is "http___....pdf".

If I use         res.setHeader("Content-Disposition","attachment;
filename="+ strArchivo + ".pdf"); it works, but it doesn't work with
"inline".

How can I resolve the problem? Can I set the file name with itext?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/problems-with-itext-and-Java-Servlets-tp16275100p16275100.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to