For those who would like to learn more about PDF support, here are some hints:
NJX supports 2 ways to use PDF with Natural for AJAX:
REPORT control (see the Natural for AJAX documentation):
That’s the way which requires more programming on the Natural side. You have to fill the report yourself at runtime.
The njxdemos contain an example for this: Start the njxdemos and select Reporting/Report.
Adapter Listener (com.softwareag.cis.server.adapterlistener.PDFFOPListener)
That’s the way which requires nearly no programming on the Natural side. You do the report design at design time: Create an PDF Print Form layout in Layout Painter.
NJX812 contains an example for this. Since NJX812 is not available yet, please find attached a simple example to get started:
Explanation: * The PDF_FOP_Demo.xml is a normal NATPAGE layout in which the Adapter Listener com.softwareag.cis.server.adapterlistener.PDFFOPListener is set. * PDF_FOP_Demo_fop.xml is a PDF Print Form. It is bound to the NATPAGE via naming conventions: same name + "_fop" * The texts in the print form are also directly bound to fields in the NATPAGE via naming convention: Search for example for "fromFirstName" in both layouts. How to run it: * Copy the 2 attached layouts * Do the Natural Adapter/html generation in the usual way * For PDF_FOP_Demo_fop.xml no Natural Adapter will be generated because it is a PDF Print Form. * For PDF_FOP_Demo.xml an Natural Adapter PDF-8.NS8 will be generated * Generate a corresponding Natural Programm for PDF-8.NS8 in the usual way. * You do not have to write any code: Simply run your main program, enter some values and press the "Generate Invoice" button.