1

Is there a way to use css pagination with the current version of dompdf shipped with CiviCRM? Like:

@page :footer {content: "page " decimal(pageno);}

The issue is that I want some content that is repeated on every page. In a dompdf issue on Github it is claimed that using fixed positioning is another way to achieve this. But we have tried this solution in CiviCRM PDF templates and it does not have that effect.

3
  • 1
    I cannot give you much detail but in our experience, creating properly formated multipage documents in CiviCRM with dompdf is very complicated to say the least. We usually use wkhtmltopdf which makes things a little bit better.
    – Fabian
    Dec 10, 2020 at 8:06
  • Thanks for this good suggestion – unfortunately in this case wkhtmltopdf isn't available on the server.
    – Andreas
    Dec 11, 2020 at 19:16
  • 1
    Also not an answer to teh dompdf issue but the new(ish) extension CiviOffice may provide an alternative solution: docs.civicrm.org/civioffice/en/latest
    – Fabian
    May 6, 2022 at 7:13

2 Answers 2

1

To self-answer my question after 2 years+, too: In the meantime, we have decided to rely on wkhtmltopdf and solve the problem there with a custom wrapper script, with which page numbers, headers, footers etc. can be defined as needed. Of course, this would also be a solution for dompdf.

As @Fabian mentioned, Civioffice is certainly also a good solution for the problem according to usecase.

0

The dompdf in civi is the latest 0.8.6. If you're asking if dompdf itself supports pagination, I don't know offhand - that would be a dompdf question.

1
  • It should support that: I tried to formulate my question a bit more precisely and also added a link about how someone managed to do it elsewhere – however in civi the solution presented there didn't work for me.
    – Andreas
    Dec 11, 2020 at 19:22

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.