I have a Java Swing based desktop app which visualizes scientific data. It's mostly JTables, with certain cells custom-rendered, and JFreeChart plots. There's also a map with GPS fixes plotted.
I want to convert all the plots, tables (and perhaps the map) into a PDF document, a kind of 'offline summary' of the data. I would like to add text (chapters, paragraphs,etc) to accompany/support the plots, tables, things like 'As can be seen from Figure 1, widget X did really well at task T". Ideally, I want to generate the 'report' via some machine-generated process.
So far, I have got as far as just dumping all the plots and tables into a PDF by way of the Java itextpdf library. But moving forward, I don't really want to learn much more of the itextpdf API to do the text part of the report (including e.g. adding a Table of Contents). I would prefer to move to Latex, and have IT produce my PDF. I would then use ImageIO to dump all the plots and tables to PNG files, and write out Latex source to include those graphics.
My hunch is that StringTemplate might be the way to go to generate my Latex source document. If ST can produce entire Java source code classes as the output of ANTLR, I imagine it can indeed also produce structured Latex source.
Looking for any advice on best way to proceed, especially from anyone who has 'been there, done that'. I should point out am I fairly proficient in Latex and ANTLR, but a newbie to both itextpdf and ST.
Stuart