Hi, I thought I would add my experience with the filenames, I found that if you use the URL redirect the browser still uses the original URL name and hence in my senario you end uo with a file called PDF.PDF However if you use the alttemplate=pdf method on the end of the url the file will be named using the current page name. I think as Darren mentioned above the real solution is to somehow set one of the HTTP headers, i will look into this next week and post my finding / solution if no one else has beat me too it :) chris
Change the name of the PDF
Hi,
Is it possible to change the name of the generated PDF file?
Currently mine turns out something like "page.aspx.pdf" and I would prefer "some-other-name.pdf".
Cheers
Bjørn Fridal
Which browser are you using.
for me it is just page.pdf (no .aspx)
The simplest way to do this would be to use url rewriting,
You could also add a macro that sets a content disposition header to the template however that would force the pdf to load out of browser.
I'd just set rewrite rules so that /path/to/my/(.*?)\.pdf$ rewrites to /path/to/my/($1).aspx
Make sense?
Hi,
Thanks, Yes it makes sense. I'll give it a try.
Oh and I use Firefox 3.6
Cheers
Bjørn Fridal
Hi, I thought I would add my experience with the filenames, I found that if you use the URL redirect the browser still uses the original URL name and hence in my senario you end uo with a file called PDF.PDF However if you use the alttemplate=pdf method on the end of the url the file will be named using the current page name. I think as Darren mentioned above the real solution is to somehow set one of the HTTP headers, i will look into this next week and post my finding / solution if no one else has beat me too it :) chris
Hi All,
I just blogged about this if anyone else wants to do this with a few code snippets to do what you need to do.
Creating PDF documents dynamically using Umbraco and XSL-FO part 2
I hope it's useful to someone :)
Cheers,
Chris
is working on a reply...