2

How would one do this in Drupal 7? I want to add a few small style edits to the way the PDF outputs. I am using TCPDF. I read somewhere that its not posible with TCPDF, but other sources say it is. Should I be switching to dompdf? I've read the documentation but just can't seem to understand which file generates the PDF.

I have the module successfully generating a PDF from a View, so this is the last step in moving on with this project.

jhoffmcd
  • 63
  • 8

1 Answers1

0

For anytime you want to style PDFs use DOMPDF, it will be less painful. Then style your pdf using print.css in the sites/domain.com/themes/yourtheme/css folder.

You can also copy the print.tpl.php file from the module's folder and paste it in sites/domain.com/themes/yourtheme/templates to choose exactly what you want to display in your pdf.

Avi
  • 21,182
  • 26
  • 82
  • 121
codehitman
  • 1,148
  • 11
  • 33
  • I got something working with wkhtmltopdf which I believe will let me adjust the template layout and CSS... although I haven't tried to adjust them yet. I will need to soon though. Do you think `DOMPDF` is a better solution? I'm totally willing to use whatever is the most effective and clean solution. – jhoffmcd Feb 14 '14 at 18:22
  • With wkhtmltopdf it is very WYSISYG brought to you by Google. So it will print exactly what you have on the screen with print/. Google Chrome uses this to print its pages. I have never used it though so I cannot speak for it.But DOMPDF is just as good and very configurable. Its all upto you and how much you want to experiment/learn. – codehitman Feb 14 '14 at 18:27