Hi.
 
I have to following code in a SERVLET:
 
            Document document = new Document();
            
            response.setContentType("application/pdf");
            PdfWriter pdfw = PdfWriter.getInstance(document, response.getOutputStream());
 
            document.open();
            document.add(new Paragraph("Hello World"));
            document.close();
 
From the browser, I do get the expected PDF results. However, when I click File | Save (and somehow Save As is disabled) on the browser, the filename that comes up is a substring of the URL currently showing in the browser, and appended with ".pdf". How can I change this file name that keeps defaulting in the Save dialog text field?
 
For example, when I click the link to execute the above code in the servlet, my browser would display the PDF results. When I choose the File | Save option from the browser, the file name that appears is start_src=test.pdf, where start_src=test was from my URL (which was /start?src="">
 
Any help would be greatly appreciated.
 
Thanks.
 
David O.
 

Reply via email to