function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ndganindgani 

set filename when page is rendered as PDF

Hi All

 

I have a VF page that is rendered as PDF or Excel.

 

I want to be able to do the following:

when a user wants to save this page i want the filename

to be something i set and not the page name.

 

for Excel I just add the name i want after the MIME Type in contentType, 

but for pdf i dont have that option.

 

please be advised when answering that the <Apex:Page> tab does not have the 'filename' attribute

as in messaging.

 

any ideas?

stephanstephan

Unfortunately, I don't think this is going to be possible. I spent some time trying a few hacks, but couldn't make it work. Sorry...

TehNrdTehNrd

Sad news, but I'm glad to hear you gave it a try.