Practice: Output PDF on the Last Page After a Table

Let's assume you want to output a PDF after the last page of a multi-page invoice, e.g. with the general terms and conditions. The challenge here is that you must trigger a pagebreak before outputting the PDF and the PDF is only output on the last page.

Proceed as follows:

1.  Add a footer at the very end of the invoice table. This footer has the Appearance Condition 'LastPage()' and the content SetVar("TablePrinted", "Yes", false).

2.  Insert a PDF object, interlink it sequentially with the report container and set the 'Pagebreak Before' option to 'True'.

3.  Set the PDF object Appearance Condition to 'LastPage() and not IsNullOrEmpty (GetVar("TablePrinted"))'.