I have working PDF Press generator which uses save_to_pdf method because I need to have a name of generated PDF based on an entry title.

Based on DOMPDF FAQ https://code.google.com/p/dompdf/wiki/FAQ I can add footer/header image to generated PDF, but I'm stuck on which PDF Press file do I need to edit to have accomplish that part?



After couple back and forth with the add-on developer (more here: http://devot-ee.com/add-ons/support/pdf-press/viewthread/12738) I have got accomplished the goal using a CSS trick from here http://eclecticgeek.com/dompdf/debug.php?identifier=b264f350e6967875987e14faa0c751f0

Template example:

    @page { margin: 180px 50px; }
    #header { position: fixed; left: 0px; top: -180px; right: 0px; height: 150px; background-color: orange; text-align: center; }
    #footer { position: fixed; left: 0px; bottom: -180px; right: 0px; height: 150px; background-color: lightblue; }
    #footer .page:after { content: counter(page, upper-roman); }
  <div id="header">
    <h1>Widgets Express</h1>
  <div id="footer">
    <p class="page">Page </p>
  <div id="content">
    <p>the first page</p>
    <p style="page-break-before: always;">the second page</p>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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