As a first step in migrating to FreeMarker, convert the base.xml file used for all PDF exports to use a FreeMarker template. This can use the conversion script created in
New file base.xml.ftl created and heavily tested. I've also switched the PDF exports over to use the new file.
For now I have left the original base.xml file in place but this can be deleted at any time now.