I have installed the Print, email and PDF version 7x2.0 beat2 and using the tcpdf third party module. I am lookign for assistance in how to style the PDF output. I am new to usign this method and not great with script lanuage but i'm looking to style up the page so that the images appear inline on the report included at http://forbesproperty.co.uk/printpdf/properties-sale/69-fairview-circle-dainstone, can someone advise how i go about this? I'm guessing that its using the PrintPDF.css style sheet within this module and not the default style sheet. Does anyone have any documentation on this as i have searched the web and not coming up with anything...
As this is a production site, i really need to get this fixed asap...
Much appreciated for your help..
Paul
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | print_pdf_tpl.txt | 2.76 KB | crasher |
Comments
Comment #1
jcnventuraThe problem is that for that to work as you have it currently, you'd need to specify the float properties in the css file used by the module (i.e. you should make http://forbesproperty.co.uk/print/properties-sale/69-fairview-circle-dai... also look as you want to.
But then you have another problem: TCPDF doesn't properly support floats. The solution in this case would be to create a print_pdf.node-[node-type].tpl.php file that outputs the images as a table.. Or bite the bullet of bad design and use tables in the original version to start with.
Comment #2
crasher commentedThank you, i have created a print_pdf.tpl.php file and inserted this into my theme/templates folder. As i new to php is there a simple way off wrapping the images into the tpl? I have attached the code in the tpl, any help on php mark-up would be great if you have time
Thank you
Comment #3
jcnventuraSorry, I really don't have time to teach you PHP. Try to join #drupal or #drupal-support in IRC, might be they can help you.
Comment #4
crasher commentedIt was more looking for the correct PHP tags to use, but thanks
Comment #5
crasher commentedCan anyone shed any light on the syntax for adding images to a table to get this render working. i have reviewed the tcpf site but cannot see a way forward.
Thanks
Comment #6
mudsurfer commentedThis does not help you, but I'm in a similar predicament with regards to styling PDFs. I have a tpl.php file, but not sure where to go next. It's compounded not only because it's PHP/Drupal theme template - but I think also needs understanding of TCPDF library, AND an understanding of old-school table based layout. If I find a good beginner's reference I'll let you know :)
Comment #7
crasher commentedThanks very much for your reply. I can style tables thats fine but its doing the php that i am not hot on, if you know the php syntax let me know what to do and i'll share with you the completed file.. I have an idea what needs to be done, but no clue where to start...
Comment #8
jcnventuraNo further info in two weeks. Closing the issue.