Hello team,

Before mailing to the mailing list, i have read the iText book completely 
. In the book its mentioned to check if the PDF is getting generated 
properly at server end.
 Yes thats true. I am able to generate the PDF properly in my server. But 
when i use HTTPServlet response, i am getting blank pages.

I have set something like this. I tried setting "ContentLength" also. But 
then also i am getting blank pages.
Request to help in this .

         HttpServletResponse response = null;
                 FacesContext context = FacesContext.getCurrentInstance();
                String currentEvent = "Deputation_Document.pdf" ;
                response = (HttpServletResponse) 
context.getExternalContext().getResponse();
                response.setHeader("Content-disposition", "attachment; 
filename="+ currentEvent);
                response.setHeader("Pragma", "public");
                response.setDateHeader("Expires", 0);
                response.setHeader("Cache-Control","must-revalidate, 
post-check=0, pre-check=0");
                response.setHeader("Cache-Control", "public");
                response.setHeader("Content-Description", "File Transfer"
);
                response.setContentType("application/pdf");
                response.setContentLength(109948);


Regards,
Swapna Matanam
Tata Consultancy Services
Mailto: swapna.mata...@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to