|
Hi, is there a way to put a more appropriate
message for the to see when downloading a pdf file created via a
servlet than what is showing now on the
attached file.
In case you cannot view the attached jpg it goes
like this
"You have chosen to download a file from this
location."
"...V2P?nextScreen=&assMixInd2 from
192.168.0.9"
The "...V2..." is what I don't want the user to is.
I would like to show the IP only.
The code that I am using is:
// create simple doc and write to a
ByteArrayOutputStream
Document document = new Document(); ByteArrayOutputStream baos = new
ByteArrayOutputStream();
PdfWriter.getInstance(document, baos);
document.open();
String fileName = "Test"
...create pdf out
document.close(); // write ByteArrayOutputStream to the
ServletOutputStream
response.setContentType("application/vnd.fdf"); response.setHeader("Content-Disposition","attachment;filename=" +
fileName + ".pdf");
response.setContentLength(baos.size());
ServletOutputStream out =
response.getOutputStream();
baos.writeTo(out);
out.flush();
|
<<attachment: itext.jpg>>
