Class API


  • public final class API
    extends java.lang.Object
    • Method Detail

      • prepare

        public static PreparedTemplate prepare​(java.io.File templateFile)
                                        throws java.io.IOException
        Prepares a document template file from the file system.
        Throws:
        java.io.IOException
      • prepare

        public static PreparedTemplate prepare​(java.io.File templateFile,
                                               PrepareOptions options)
                                        throws java.io.IOException
        Prepares a document template file from the file system.
        Throws:
        java.io.IOException
      • fragment

        public static PreparedFragment fragment​(java.io.File fragmentFile,
                                                PrepareOptions options)
                                         throws java.io.IOException
        Prepares a document fragment from the file system. Fragments can be used to embed extra content when rendering document templates. For example, custom headers and footers can be reused across documents this way.
        Parameters:
        fragmentFile - template file from file system to be used as document fragment
        Returns:
        fragment instance, not null
        Throws:
        java.lang.IllegalArgumentException - when fragmentFile is null
        java.io.IOException - on file system error
        java.io.FileNotFoundException - when file is not found on file system
      • fragment

        public static PreparedFragment fragment​(java.io.File fragmentFile)
                                         throws java.io.IOException
        Throws:
        java.io.IOException