Jodreports-examples is a project mainly written in Java, it's free.
A few examples how to use the JOD Reports / JOD Convert document generation libraries
Contains a few learning tests showcasing how to create OpenOffice documents from OpenOffice template documents and converting them into PDF files, all using the free (LGPL) libraries JODReports and JODConvert.
See