Interface DocumentTemplate

    • Method Detail

      • setXmlEntries

        void setXmlEntries​(java.lang.String[] xmlEntries)
        Set which XML entries in the ODT template can contain templating instructions.

        By default they are content.xml and styles.xml.

        To add all possible XML entries use

         template.setXmlEntries(new String[] {
             "content.xml",
             "meta.xml",
             "settings.xml",
             "styles.xml"
         });
         
        Parameters:
        xmlEntries -
      • setContentWrapper

        void setContentWrapper​(DocumentTemplate.ContentWrapper contentWrapper)
        Hook to set custom FreeMarker directives on each XML entry.

        The default implementation escapes XML entities and converts newline characters into line-break tags.

        Parameters:
        contentWrapper -
      • setOpenDocumentSettings

        void setOpenDocumentSettings​(java.util.Map openDocumentSettings)
      • getConfigurations

        java.util.Map getConfigurations()
      • createDocument

        void createDocument​(java.lang.Object model,
                            java.io.OutputStream output)
                     throws java.io.IOException,
                            DocumentTemplateException
        Merge the data model into this template and create the output document.
        Parameters:
        model -
        output -
        Throws:
        java.io.IOException
        DocumentTemplateException