I am trying to retrieve the data from a database query and format the output in PDF.
The number of records returned from the query varies. And there are three main parts expected in the PDF: the header, the commodities and the additional information.
The header is always the first 9 columns from the record set and it only needs to display once.
The number of commodities varies based on the number of rows returned.
The number of additional information also varies depending on whether the 'additional information' column is Null or not.

The output file emulation to CSV, Fixed length columns or XML in PlanetPress Database plugin works fine. But I am struggling with outputting/formatting to PDF from CSV, fixed length columns or XML.

I'd appreciate if anyone would give an idea on the process after the Database plugin.