[opencms-dev] Change exported filename

Marc Johnen opencms at johnen.biz
Wed May 5 12:32:58 CEST 2010


Hello everyone,

I'm writing a function to export the current Page as PDF using iText.
For this I pass a parameter to the template-jsp. When it is set,
I write the PDF directly to the response. Everything works nicely and
the PDF also is being exported with the filename of the the
current resource and something like "_1005314823.html" added to it.

So far everything is good. The catch is, the Browser doesn't open
the file correctly when it has ".html" as ending (I do set the correct
the correct contenttype). It does work when I manually change the
ending in the docroot of Apache. The ending must be ".pdf". 
Is there a way to change the ending at the time of export?
I experimented with the exportname-property without success,
it only seems to work for folders, not for files.

Any hint are highly appreciated.
Greetings
Marc
-- 
View this message in context: http://old.nabble.com/Change-exported-filename-tp28459178p28459178.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list