Dompdf totalPageNumber

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • czcpf
    Senior Member
    • Aug 2022
    • 160

    Dompdf totalPageNumber

    EspoCRM docs say {totalPageNumber} & ​{pageAbsoluteNumber} are only available in TCPDF. For Dompdf I can only get current {pageNumber}. So doesn't anyone know how we could do something like this in Dompdf on pdf template?

    FOOTER
    Page {pageNumber} of {pageAbsoluteNumber}
  • bobcompleet
    Junior Member
    • Jun 2022
    • 10

    #2
    I think you should be able to implement this with some custom css as discussed here: https://stackoverflow.com/questions/...-with-css-html
    As far as I can tell DomPDF supports the CSS Paged Media module (full docs to found here, quite terse tho: https://www.w3.org/TR/css-page-3/ ), so you should be able to add a counter like that to an element which you set to the page footer, or if that doesn't work you can always set a page footer with absolute positioning as described in the dompdf wiki here: https://github.com/dompdf/dompdf/wik...der-and-footer

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      > as described in the dompdf wiki here

      From the same page: "Dompdf does not currently support generating the total number of pages using CSS."
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • bobcompleet
        Junior Member
        • Jun 2022
        • 10

        #4
        Ouch, thanks yuri I stand corrected

        Comment

        Working...