​​​​​​​Multiple PDFs sharing one header and footer template? 

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamie
    Senior Member
    • Aug 2025
    • 101

    #1

    ​​​​​​​Multiple PDFs sharing one header and footer template? 

    has anyone figured out a good way to get all the pdfs to use the same header and footer template file?

  • shalmaxb
    Senior Member
    • Mar 2015
    • 1754

    #2
    Cannot say, if it a "good" way for everybody, but for me it works.
    I create custom fields in such situations, which I then set by the placeholder in the respective templates, where I want that.
    Another possibility would be to create kindo of default dummy template with formatted header and footer but with blank main content. Then for every new template you modify that template and save it under a new name.
    Last edited by shalmaxb; 10-02-2025, 01:43 PM.

    Comment

    • shalmaxb
      Senior Member
      • Mar 2015
      • 1754

      #3
      as the edit did not appear, here another solution:
      Another possibility would be to create kindo of default dummy template with formatted header and footer but with blank main content. Then for every new template you modify that template and save it under a new name.

      Comment


      • jamie
        jamie commented
        Editing a comment
        That's what we have been doing, but now with about 50 templates, I fear the day we want to change our logo or phone number

      • shalmaxb
        shalmaxb commented
        Editing a comment
        I solve this by formula as well, as I create a custom field for logo. The logo itself I save in documents and from there I set it by attachment id in the entity. I do not save the logo directly in the entity. When I have to change the logo, I merely upload a new logo attachment to documents. Also possible is to provide more than one logo and decide, which logo to use by an #ifEqual condition in the template.
        When you - as in my case - do not have sufficient skills, in espoCRM in most cases there is a solution. That makes this system so extraordinary.
        Last edited by shalmaxb; 10-03-2025, 11:22 AM.
    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9440

      #4
      A possible solution is to create a custom helper. https://docs.espocrm.com/development...custom-helper/
      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


      • jamie
        jamie commented
        Editing a comment
        yuri that is even more than what i need, thanks Sorry, i should have read the docs first, though my more experienced workmate thought there wasn't a solution
    • jamie
      Senior Member
      • Aug 2025
      • 101

      #5
      shalmaxb yrui's solution is easy, powerful and probably exactly what you want, but most thanks for sharing what you have done

      Comment


      • shalmaxb
        shalmaxb commented
        Editing a comment
        Sure the solution of yuri is better without any doubt, but I am not a coder. But I will have a look into that nevertheless. Thanks for your feedback.
    • jamie
      Senior Member
      • Aug 2025
      • 101

      #6
      shalmaxb i know it can look scary though its really a lot easier then it looks, just follow the instructions and you'll come right, if not drop me a line and i'll see what i can do

      Comment

      Working...