I have a custom visualforce page where i can see list of attachments in pageblock table. I need to print all those attachments. there are two ways

  1. Have a print button on the above table - when i click on button then all the attachments should go to printer directly for print.
  2. Have a print button for each items - when i click on each item it should print. I don't want open the document in browser then save and print.

Any help would be greatly appreciated.


This is more a question about browser behaviour than about Salesforce.

Browser's support neither of your options: the best you can do is use JavaScript to open all the documents in separate tabs or windows and initiate the print via JavaScript but a print dialog will display for each document requiring the user to confirm the print. (This is the general case: you might find solutions for specific browsers or outdated versions of browsers.)

| improve this answer | |
  • Thank you for your comment. Appreciated.. I will use JavaScript. Can you please provide high-level idea to use JavaScript?. – user51204 Sep 2 '16 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.