I need single invoice template with multiple header and footer using place holder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashif Malayil
    Senior Member
    • Dec 2023
    • 171

    I need single invoice template with multiple header and footer using place holder

    So, i have different Headers and Footers for Invoice PDF Template based on countries. So instead of creating multiple Invoice templates i want to use a single standard template and header and footer image should change using the place holder. It's happening but i can't modify these image size. What i can do to achieve this?
    Last edited by yuri; 10-19-2024, 07:04 AM. Reason: Removed the exclamation mark from the topic name!
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1603

    #2
    can you post the code you are using.

    Comment

    • Ashif Malayil
      Senior Member
      • Dec 2023
      • 171

      #3
      There is no code for header and Footer.

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1603

        #4
        Then you will have to create the code in PDF template. There are checkboxes at the bottom to activate header and footer. Then two editor windows open for these two regions. There you put your template code, adjust the height according to your layout (needs a bit trial and error).
        The code itself needs ifEqual condition to determine, under which condition which image will appear. The image size you can insert like in HTML with height and width.
        Did you have a look here: https://docs.espocrm.com/user-guide/printing-to-pdf/

        You should start to code this and on the way you may post, what you did, so we could check it.

        Comment

        • emillod
          Active Community Member
          • Apr 2017
          • 1405

          #5
          You can also use ChatGPT to generate nice invoice. Specify that you want to print it through specific PDF engine and attach image or something
          I would use if's to use different images with different headers.

          Comment

          • Ashif Malayil
            Senior Member
            • Dec 2023
            • 171

            #6
            So I can use "If" statements to change the header and footer in the invoice template, right? However, the issue remains with the placeholder for the image field, as I am unable to correctly define the image size in the invoice template.

            Comment

            • emillod
              Active Community Member
              • Apr 2017
              • 1405

              #7
              Yes, you can - Printing to PDF.
              In regard to the size of image, please check this Printing to PDF. There is a width and height param.

              Comment

              • Ashif Malayil
                Senior Member
                • Dec 2023
                • 171

                #8
                Thank you ! emillod shalmaxb, The issue i was facing with the image size adjustment got fixed with this,
                - Header: {{imageTag cCompanyHeaderId width=750 height=150}}
                - Footer: {{imageTag cCompanyFooterId width=700 height=125}}
                Now the Invoice template is working fine, great help.​

                Comment

                • emillod
                  Active Community Member
                  • Apr 2017
                  • 1405

                  #9
                  No problem, Enjoy using EspoCRM

                  Comment

                  Working...