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
If you redirect user to a link /servlet/servlet.FileDownload?file=[attachmentID Here]", it will automatically download the attachment.For example link check below,
https://cs15.salesforce.com/servlet/servlet.FileDownload?file=00Pe0000002CEcyEAG
In your case, you need to make the "download pdf" to link to URL similar to above.