Class FoGenerator


  • public class FoGenerator
    extends java.lang.Object
    The FoGenerator class.
    • Constructor Detail

      • FoGenerator

        public FoGenerator​(java.io.File source)
        Constructs an instance of FoGenerator.
        Parameters:
        source -
    • Method Detail

      • addProperties

        public final FoGenerator addProperties​(java.util.Properties properties)
        Add properties to the FoGenerator.
        Parameters:
        properties -
      • setName

        public final FoGenerator setName​(java.lang.String name)
        Sets the filename
      • setFilename

        public final FoGenerator setFilename​(java.lang.String name)
        Sets the filename
      • setConfig

        public final FoGenerator setConfig​(java.lang.String config)
        Sets the config directory.
      • setTarget

        public final FoGenerator setTarget​(java.io.File target)
        Sets the target directory.
      • setDebug

        public final FoGenerator setDebug​(boolean debug)
        Sets the true if the fo file will be generated
      • writeFo

        protected static void writeFo​(Book book,
                                      FoContext config,
                                      java.io.Writer writer)
                               throws java.io.IOException
        Writes the Book to FO.
        Parameters:
        book -
        config -
        writer -
        Throws:
        java.io.IOException
      • writePdf

        protected static void writePdf​(java.io.File file,
                                       java.io.InputStream source,
                                       org.apache.fop.apps.FopFactory factory)
                                throws java.lang.Exception
        Writes the FO stream to PDF.
        Parameters:
        file -
        stream -
        factory -
        Throws:
        java.lang.Exception
      • buildBook

        public final Book buildBook()
                             throws java.io.IOException
        Build the markdown based book.
        Throws:
        java.io.IOException
      • getFoStream

        protected final java.io.InputStream getFoStream​(Book book,
                                                        FoContext config)
                                                 throws java.io.IOException
        Get the FO InputStream.
        Parameters:
        book -
        config -
        Throws:
        java.io.IOException
      • generate

        public final void generate()
                            throws java.io.IOException
        Build the markdown based book.
        Throws:
        java.io.IOException