Answers.Body: <p>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.</p>
  <p>As @Fabian mentioned, <a href="https://docs.civicrm.org/civioffice/en/latest/" rel="nofollow noreferrer">Civioffice</a> is certainly also a good solution for the problem according to usecase.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-02T08:55:46.750Z
Answers.LastActivityDate: 2023-05-02T08:55:46.750Z
Answers.UserDisplayName: Andreas
Answers.Body: <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-11T19:22:54.160Z
Answers.Text: 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.
Answers.UserDisplayName: Andreas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-09T22:11:10.500Z
Answers.LastActivityDate: 2020-12-09T22:11:10.500Z
Answers.UserDisplayName: Demerit
Body: <p>Is there a way to use css pagination with the current version of dompdf shipped with CiviCRM? Like:</p>
  <pre><code>@page :footer {content: &quot;page &quot; decimal(pageno);}
  </code></pre>
  <p>The issue is that I want some content that is repeated on every page. <a href="https://github.com/dompdf/dompdf/issues/1190" rel="nofollow noreferrer">In a dompdf issue on Github</a> 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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-10T08:06:35.183Z
Comments.Text: 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.
Comments.UserDisplayName: Fabian
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-11T19:16:07.177Z
Comments.Text: Thanks for this good suggestion – unfortunately in this case wkhtmltopdf isn't available on the server.
Comments.UserDisplayName: Andreas
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-06T07:13:32.973Z
Comments.Text: Also not an answer to teh dompdf issue but the new(ish) extension CiviOffice may provide an alternative solution: https://docs.civicrm.org/civioffice/en/latest/
Comments.UserDisplayName: Fabian
Tags: <pdf><css>
Title: Is there a way to use css pagination / repeating elements with dompdf?
ThreadText: # Is there a way to use css pagination / repeating elements with dompdf?
  
  (Asked by: username_0 on 2020-12-09)
  
  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](https://github.com/dompdf/dompdf/issues/1190) 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.
  
  **Tags:** pdf, css
  
  > **Comments:**
  > **username_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.  
  > **username_0**: Thanks for this good suggestion – unfortunately in this case wkhtmltopdf isn't available on the server.  
  > **username_1**: Also not an answer to teh dompdf issue but the new(ish) extension CiviOffice may provide an alternative solution: https://docs.civicrm.org/civioffice/en/latest/  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-05-02. Score: 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 @username_1 mentioned, [Civioffice](https://docs.civicrm.org/civioffice/en/latest/) is certainly also a good solution for the problem according to usecase.
  
  
  ---
  
  ### Answer by username_2 on 2020-12-09. Score: 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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  