PDF generator extension – how to create a custom template?

Our PDF generator extension had a simple template.  The old template looks like the image below.


We wanted a custom template with our logo, our company details and our specific colors.  Pdf  generator Pro has 5 different templates for invoice, order,  shipment,  credit memo and product.  For each of these I made two versions with page orientation portrait and landscape. I started with invoice template.

I completed the settings fields in EaDesign PDF->Templates->Settings. In this area I chose the file name, the page format, orientation and page layout.

In header contents tab it is recommended to write all the information that you want to appear in top of every page. Here you can put your logo or company information.

The majority of the HTML code is in Page contents. The most important table lines are ##productlist_start## and ##productlist_end## .  By define them properly, all product details are displayed. The table lines above must have colspan=”max number of columns”.


In Page contents the most HTML code has a "style" tag in witch I inserted the CSS code. In this way it will be easier for future users to customize it to their needs. Another part of the CSS code is in Template Css. There I wrote the CSS code for the table of invoice.

In the footer I wrote the HTML code for the page numbers, code which must be repeated on every page.

After I finished the invoice template, I adapted the others template with their requirements.

1 Response to PDF generator extension – how to create a custom template?