Freemarker is just the template engine. You can use any template engine you want to generate the BFO xml. I have personally used
Handlebars and
Trimpath as template engine. As long as the final xml conforms with BFO, you can generate the PDF using render.xmlToPdf or if you are using a suitlet and want to render it to the response, use ServerResponse.renderPdf