I am attempting to build a pdf file from xml on the fly and then send this pdf file to a user of my site. I have managed to do this. However, once the pdf has loaded into the browser, if the user clicks on the "Save a Copy" button, the filename automatically given is the url of the pdf file. How can I set this to something else?

I know I could save a temp file server-side but that is not something I want to do unless absolutely necessary.

Below is the code I'm using:

XSLTCls objXSLT = new XSLTCls(servletContext);
byte[] content = objXSLT.transform_pdf(strXHTML, map);

response.addHeader("Content-Disposition", "inline;     filename=\"aow1234.pdf\";");

OutputStream outStream = response.getOutputStream();