I want to develop a visualforce page with "download pdf" link. So that when user clicks on the link, related pdf file will be downloaded. How would I set that up? The pdf file has already been uploded to documents inside Salesforce.

1 Answer 1


If you redirect user to a link /servlet/servlet.FileDownload?file=[attachmentID Here]", it will automatically download the attachment.For example link check below,


In your case, you need to make the "download pdf" to link to URL similar to above.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .