• Resolved helmut71

    (@helmut71)


    If I activate the footer in the invoice template, the page number is shown to me. I would like to display my own information there. What should I do? Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    This is a pretty technical question because it’s related to the PHP class TCPDF used by Vik Booking to convert HTML contents into readable PDF documents.

    What you’ve done with the invoice template file is to turn on a property that will add the footer to each page of the PDF file, but it’s not possible to define or extend the content of the footer, which includes the page number by default in the PHP class TCPDF.

    Invoices are generated by core files of Vik Booking, you cannot control the TCPDF object through the template file or through hooks/actions, and so this means that adding custom content to the footer is not possible. You may need to modify the PHP code of the core class TCPDF, because by default the footer contains the page information of the document. There are no built-in functions to define a custom content.

    Our suggestion is to turn off the footer just like the default property of the invoice template file, and then you can add your own custom “footer” by using HTML content. We understand that this may not really be added to the “footer” section of the document, but it’s the only solution available since there are no properties nor methods to tell the TCPDF class to use custom a content for the footer.

    We hope this helps!
    The VikWP Team

    Thread Starter helmut71

    (@helmut71)

    many thanks for the answer. I’ve tried this way, but I can’t position it at the end of the page.

    Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    Yes, that is normal. That’s why I mentioned that your text may not really be added to the “footer” of the page, it’s because there is no absolute positioning for the content of the PDF. The PHP class TCPDF is based on DOM manipulation, and so that’s not a CSS parser.
    The point is that the footer doesn’t take any contents, it’s composed automatically depending on the pages of your document. Only the header accepts some data through an associative array, but for the footer this is not available, I’m sorry.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘invoice template’ is closed to new replies.