TransWikia.com

Add header and footer for every pages printed

Drupal Answers Asked on January 14, 2021

I’ve used print module version 7.x-2.0. I’ve used pdf-version and print-friendly-version.

Now i want to do two different things. That is,

  • Is it possible to add separate CSS for pdf, html or email templates like: print-pdf.css, print-html.css, print-email.css, print.css.?
  • I have added header and footer. It only works for first page and last page, But I want to display them for every printed pages. How can I do that?

2 Answers

You could try one of the css only solutions here https://stackoverflow.com/questions/1360869/how-to-use-html-to-print-header-and-footer-on-every-printed-page-of-a-document

The reports say that it does not work on all browsers maybe support is better nowadays with some of the NEWER answers.

Answered by GiorgosK on January 14, 2021

you can do it to inset html tag in header ot footer file in tpl.php

<div class="header_print">enter your header </div>
print $content of your page 
<div class="footer_print">enter your footer</div>


<style type="text/css">

    .Footer {
            position: fixed;
            bottom: 0;
        }
    .Header {
            position: fixed;
            top: 0;
        }

</style>

Answered by Adi on January 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP