Hi,

I am using print module and generating pdf file using mpdf library. My page has display suite layout. When I generate pdf, I can see the contents of the display suite. So far good.

How can I control what to print and what not to print in pdf? How can I change the layout of the pdf file? Now, it prints all the links ( like view, edit, next, prev, etc.). If you can point me to the right direction as for how to proceed, it will be helpful.

Thanks,
D

Comments

VM’s picture

By editing the default print.css or specifying you own CSS file and/or the print.tpl.php files, it is possible to change the look of the output page to suit your taste. For a more fine-grained customization,It is possible to set per-content-type and/or theme-specific templates which are searched for in the following order:
1. print--[format]--node--[type].tpl.php in the theme directory
2. print--[format].tpl.php in the theme directory
3. print--node--[type].tpl.php in the theme directory
4. print.tpl.php in the theme directory
5. print.tpl.php in the module directory (supplied by the module)

per: the print.module documentation @ https://www.drupal.org/node/190171

drupalfriend123’s picture

Thank you VM. I will look into it and see what I can do.

drupalfriend123’s picture

I did go to sites > all > modules > print > css > print.css. I have changed some css styling. Then, I went to my page> generate pdf > I did not see any change on my pdf statements. I spent a lot of time. I could not make any change on my pdf file.

I feel that print.css may not pointing to generate pdf link. I am lost.

Originally, I enabled print module. Then, I enabled pdf_using_mpdf module and installed mpdf library.

Please help.

D

drupalfriend123’s picture

I think print.tpl.php and print.css is for printer friendly version not for pdf.

I am trying to change the layout and css of the pdf file.

my page: http://bettylist.com/ac/myview

Please advise.

VM’s picture

so you go back to the documentation @ https://www.drupal.org/node/190171
scroll to the bottom and there are links to other sections. For example a document page discussing theme functions.

you should never hack a modules css files. you override in your own css file. You don't discuss whether css aggregation is enabled or note. My research indicates that whether printing to a printer or to a pdf shouldn't matter.