DynaPDF Invoice example
It shows how to create a multi page invoice PDF from FileMaker using our DynaPDF functions. This includes page breaks if there are a lot of positions on the page. We use a template PDF for the background of the invoices. First page of the template defines the first page of the invoice which includes space for address and company information. Second page from template is used for other invoice pages. Finally we take all the other pages from our template PDF and add in the invoice. This allows us to include extra pages for Terms of Sales or other legal information.
The PDF creation can run on FileMaker Server if needed and the PDF is stored in a container and written as file to disk. Of course you can use the PDF file to email to a client right away.
To layout the invoice we use several text blocks for details like the company info and the address. We show the invoice number, a heading line and the date on the page. For all the items we walk over the records and add them to a layout table in DynaPDF. This table is than drawn over all the pages needed. For the intermediate sum on each page and the final sum with tax calculation we use two extra tables. Finally we loop over pages to add page numbers.
If needed you can use DynaPDF to sign the PDF with a digital signature or create a PDF/A version.
The example is included with 6.3pr3 plugins or newer.