What is the best way to setup a custom printer friendly link on each contact record? i would like to have a print button on the top of each contact record that would allow someone to view a better looking pdf version of the information on a contact record.
-
Hi - you might need to clarify what counts as "the information on a contact record', eg do you mean 'only data that shows on the Summary screen', or 'including all Memberships and Events etc' or 'only Summary data plus contact custom fields'. etc– petednz - fuzion ♦Commented Dec 5, 2019 at 20:37
-
What's the use case for this? Pdf's encourage people to print or save data outside of Civi which often is a bad thing. FYI the default print icon on Civi pages is removed in 5.20– Aidan ♦Commented Dec 6, 2019 at 9:05
-
@petednz-fuzion Just the summary information.– WVMikeCommented Dec 12, 2019 at 20:54
-
@Aidan they dont print often but when they do it looks really bad so im thinking the drupal view route is good enough to try.– WVMikeCommented Dec 12, 2019 at 21:00
-
I would def. go Views approach– petednz - fuzion ♦Commented Dec 12, 2019 at 23:02
1 Answer
If you use Drupal, I'd recommend setting up a view that lays out the bits you want for your print-friendly data screen, and then use the Drupal print module to give you the print-friendly and/or pdf-generated versions.
The print module can actually generate both print-friendly and pdf-generated versions of any page (via a url trick, prefix with "print/"), i.e. you can use a url like this:
/print/civicrm/contact/view?reset=1&cid=yourcontactid
but they probably won't look very nice. You can do some customziations via the print.css file of your theme.
It's probably harder than you think, less useful, and not a good idea most of the time as noted in the comments above.