0

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?
1
  • i also want same functionality. header and footer should display in each page. is any update on it?
    – harry
    Commented May 20, 2016 at 6:17

2 Answers 2

0

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>
2
  • It is not working as i expected
    – Guru
    Commented Sep 11, 2015 at 8:46
  • I know this method works for dompdf, but then you must make sure the classes match (not header_print and Header ). Also you might want to add a width of 100% or specify left: 0; right: 0. Commented Jan 7, 2017 at 11:43
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.