Different margin for header/footer and content in pdf template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan
    Member
    • Jul 2021
    • 71

    Different margin for header/footer and content in pdf template

    Would it be possible to create different left/right margins for header/footer and content in a pdf template?

    I use headers and footers across the entire width - of course this makes no sense for the content of the document - so I would like margin on the content, but not on header & footer.

    I currently solve this problem with a table, with which I create a margin in the content of the document, but this makes the creation of pdf templates more complex. Is there perhaps a simpler solution?
  • yuri
    Member
    • Mar 2014
    • 8826

    #2
    Other than CSS, there's no other solution. You can use a DIV with a CSS.

    Copy pasting the header and footer is the best I solution I could think of.
    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

    • Stefan
      Member
      • Jul 2021
      • 71

      #3
      Originally posted by yuri
      Other than CSS, there's no other solution. You can use a DIV with a CSS.

      Copy pasting the header and footer is the best I solution I could think of.
      How would i do this? If I set Left/Right maring in the template settings, I did not manage to display the header or footer over the whole page. I've tried it with position: absolute, negative left-margin, but couldn't find a solution. (Im using TCPDF as pdf engine)

      Comment

      • yuri
        Member
        • Mar 2014
        • 8826

        #4
        TCPDF is a legacy. We don't support it unfortunately.
        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

        • Stefan
          Member
          • Jul 2021
          • 71

          #5
          Originally posted by yuri
          TCPDF is a legacy. We don't support it unfortunately.
          With Dompdf this would be possible?

          Comment

          • yuri
            Member
            • Mar 2014
            • 8826

            #6
            It has much better CSS support. It should be possible.
            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

            Working...