Class FORendererApacheFOP

java.lang.Object
org.docx4j.convert.out.fo.renderers.AbstractFORenderer
org.docx4j.convert.out.fo.renderers.FORendererApacheFOP
All Implemented Interfaces:
FORenderer

public class FORendererApacheFOP
extends AbstractFORenderer
The Apache FO Renderer uses Apache FOP to render the fo document and is the default FO Renderer
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    protected static class  FORendererApacheFOP.FopPlaceholderLookup  

    Nested classes/interfaces inherited from interface org.docx4j.convert.out.FORenderer

    FORenderer.SectionPageInformation
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected static FORendererApacheFOP instance  
    protected static org.slf4j.Logger log  

    Fields inherited from class org.docx4j.convert.out.fo.renderers.AbstractFORenderer

    TEXTBOX_POSTPROCESSING_REQUIRED

    Fields inherited from interface org.docx4j.convert.out.FORenderer

    PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX
  • Constructor Summary

    Constructors 
    Constructor Description
    FORendererApacheFOP()  
  • Method Summary

    Modifier and Type Method Description
    protected org.apache.fop.apps.FormattingResults calcResults​(org.apache.fop.apps.FopFactory fopFactory, java.lang.String outputFormat, javax.xml.transform.Source foDocumentSrc, PlaceholderReplacementHandler.PlaceholderLookup placeholderLookup)
    For first pass of two pass process, invoke org.apache.fop.apps.FormattingResults which can tell us the number of pages in each page sequence, and in the document as a whole.
    protected org.apache.fop.apps.Fop createFop​(java.lang.String userConfiguration, java.lang.String outputFormat, java.io.OutputStream outputStream)  
    protected static org.apache.fop.apps.FopFactory createFopFactory​(java.lang.String userConfig)
    Create and configure FopFactory.
    protected static org.apache.fop.apps.FopFactory getFopFactory​(java.lang.String userConfig)  
    static org.apache.fop.apps.FOUserAgent getFOUserAgent​(FOSettings settings)
    Allow user access to FOUserAgent, so they can setAccessibility(true).
    static FORenderer getInstance()  
    void render​(java.lang.String foDocument, FOSettings settings, boolean twoPass, java.util.List<FORenderer.SectionPageInformation> pageNumberInformation, java.io.OutputStream outputStream)  
    protected void render​(org.apache.fop.apps.FopFactory fopFactory, org.apache.fop.apps.FOUserAgent foUserAgent, java.lang.String outputFormat, javax.xml.transform.Source foDocumentSrc, PlaceholderReplacementHandler.PlaceholderLookup placeholderLookup, java.io.OutputStream outputStream)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • render

      public void render​(java.lang.String foDocument, FOSettings settings, boolean twoPass, java.util.List<FORenderer.SectionPageInformation> pageNumberInformation, java.io.OutputStream outputStream) throws Docx4JException
      Throws:
      Docx4JException
    • getInstance

      public static FORenderer getInstance()
    • render

      protected void render​(org.apache.fop.apps.FopFactory fopFactory, org.apache.fop.apps.FOUserAgent foUserAgent, java.lang.String outputFormat, javax.xml.transform.Source foDocumentSrc, PlaceholderReplacementHandler.PlaceholderLookup placeholderLookup, java.io.OutputStream outputStream) throws Docx4JException
      Throws:
      Docx4JException
    • calcResults

      protected org.apache.fop.apps.FormattingResults calcResults​(org.apache.fop.apps.FopFactory fopFactory, java.lang.String outputFormat, javax.xml.transform.Source foDocumentSrc, PlaceholderReplacementHandler.PlaceholderLookup placeholderLookup) throws Docx4JException
      For first pass of two pass process, invoke org.apache.fop.apps.FormattingResults which can tell us the number of pages in each page sequence, and in the document as a whole.
      Parameters:
      fopFactory -
      outputFormat -
      foDocumentSrc -
      placeholderLookup -
      Returns:
      Throws:
      Docx4JException
    • createFop

      protected org.apache.fop.apps.Fop createFop​(java.lang.String userConfiguration, java.lang.String outputFormat, java.io.OutputStream outputStream) throws org.apache.fop.apps.FOPException
      Throws:
      org.apache.fop.apps.FOPException
    • getFOUserAgent

      public static org.apache.fop.apps.FOUserAgent getFOUserAgent​(FOSettings settings) throws Docx4JException, org.apache.fop.apps.FOPException
      Allow user access to FOUserAgent, so they can setAccessibility(true). Access to other settings is possible but unsupported.
      Parameters:
      wmlPackage -
      Returns:
      Throws:
      org.apache.fop.apps.FOPException
      Docx4JException
    • getFopFactory

      protected static org.apache.fop.apps.FopFactory getFopFactory​(java.lang.String userConfig) throws org.apache.fop.apps.FOPException
      Throws:
      org.apache.fop.apps.FOPException
    • createFopFactory

      protected static org.apache.fop.apps.FopFactory createFopFactory​(java.lang.String userConfig) throws org.apache.fop.apps.FOPException
      Create and configure FopFactory.
      Parameters:
      userConfig -
      defaultBaseURI -
      Returns:
      Throws:
      org.apache.fop.apps.FOPException