I am using iText1.3.jar and writing following code in my
servlet . It opens a download dialog box and later in Adobe Acrobat when i try to open this file it gives error that - file is an attachment and corrupt and cant be open.
response.setHeader("Content-Disposition","attachment;filename=c:\\Report.pdf;");
response.setHeader("Content-Type","application/pdf");
Document
doc = new Document();
PdfWriter docWriter = PdfWriter.getInstance(doc, response.getOutputStream());
doc.open();
doc.add(new Paragraph("Report 1"));
What is being left to let open this file in Adobe Acrobat ? Please Help!!