xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Allison" <macsma...@aol.com>
Subject RE: Servlet Output Filename
Date Wed, 07 Jan 2009 18:39:57 GMT
Thanks, I had just figured this out. Same technique.

Took me a little while the find the proper spot in the Servlet (remember I'm
JAVA-challenged) but have got it working.

Thanks,
Pete Allison

-----Original Message-----
From: Steve Quirk [mailto:squirk@ieee.org] 
Sent: Wednesday, January 07, 2009 12:03 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Servlet Output Filename




On Wed, 7 Jan 2009, Pete Allison wrote:

> All,
>
> I cannot figure out how to specify the output filename when calling 
> FOP from a servlet. I extended the example servlet that came with the
distribution.
>
> I confess I know just enough JAVA to be dangerous, but that didn't 
> stop me from successfully using FOP. However, on this I'm stumped and 
> I must be able to allow the user to specify the outfile name.
>
> I have search the FAQs, the internet, and tried to use setOutfile.

I'm not familiar with the servlet example, but normally in a servlet you'd
set the content-disposition header:

     HttpServletResponse aResponse;   // assume you have this
     aResponse.setContentType("application/octet-stream");
     aResponse.addHeader("Content-Disposition", "attachment; filename=\"" +
aName + ".pdf\"");

Steve

>
> I'm using 0.94.
>
> Thanks,
> Pete Allison
> "Do or do not. There is no 'try.' " - Yoda
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message