[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2417) Add ability to serve PDFs with "content-disposition:attachment"
Alex Savitsky (JIRA)
jira-events at lists.jboss.org
Thu Dec 20 09:22:47 EST 2007
Add ability to serve PDFs with "content-disposition:attachment"
---------------------------------------------------------------
Key: JBSEAM-2417
URL: http://jira.jboss.com/jira/browse/JBSEAM-2417
Project: JBoss Seam
Issue Type: Feature Request
Components: PDF
Reporter: Alex Savitsky
Currently, all PDFs are served with "content-disposition:inline", which doesn't give users a chance to save the PDF until it's opened. Our users have requested this feature in our apps, but there are no such capabilities in Seam PDF as of yet, as far as I can see.
Currently, my workaround involves patching org.jboss.seam.pdf.ui.UIDocument (patch attached), and executing PDF generation via:
try {
renderer.render("/report.xhtml");
} catch (Exception e) {
facesMessages.add("Error generating report: " + e.getMessage());
return;
}
DocumentData data = UIDocument.getDocData();
// now we can output the generated PDF in the usual way, via response.getoutputStream().write(data.getData()),
// setting the content-disposition as we please
However, I realize this might not be the most preferred way, so suggestions are welcome here :)
Regards,
Alex
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list