Package org.docx4j.convert.out.fo
Class LayoutMasterSetBuilder
java.lang.Object
org.docx4j.convert.out.fo.LayoutMasterSetBuilder
A description of how this stuff works
can be found at /docs/headers_footers.docx
Its not possible to let FOP set the height (@extent) of the header and footer regions
automatically: http://apache-fop.1065347.n5.nabble.com/Auto-size-header-to-fit-with-content-td4455.html
So we need to set the height (@extent) of the header and footer regions explicitly.
We do that by creating a temp FO file which contains essentially just the headers/footers,
then interrogating FOP's area tree representation to find the height of each.
So:
1. create LayoutMasterSet (with large extents)
2. generate area tree from that
3. return LayoutMasterSet (with required extents)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendLayoutMasterSetFragment(AbstractWmlConversionContext context, Node foRoot) For XSLFOExporterNonXSLTprivate static org.plutext.jaxb.xslfo.PageSequenceMastercreatePageSequenceMaster(HeaderFooterPolicy hf, String sectionName) private static org.plutext.jaxb.xslfo.SimplePageMastercreateSimplePageMaster(String masterName, PageDimensions page, String appendRegionName, boolean needBefore, boolean needAfter) private static voidfixExtents(org.plutext.jaxb.xslfo.LayoutMasterSet lms, AbstractWmlConversionContext context, boolean useXSLT) private static org.plutext.jaxb.xslfo.ObjectFactoryprivate static org.plutext.jaxb.xslfo.LayoutMasterSetstatic DocumentFragment
-
Field Details
-
log
protected static org.slf4j.Logger log -
factory
private static org.plutext.jaxb.xslfo.ObjectFactory factory
-
-
Constructor Details
-
LayoutMasterSetBuilder
public LayoutMasterSetBuilder()
-
-
Method Details
-
getLayoutMasterSetFragment
-
fixExtents
private static void fixExtents(org.plutext.jaxb.xslfo.LayoutMasterSet lms, AbstractWmlConversionContext context, boolean useXSLT) -
appendLayoutMasterSetFragment
For XSLFOExporterNonXSLT- Since:
- 3.0
-
getFoLayoutMasterSet
private static org.plutext.jaxb.xslfo.LayoutMasterSet getFoLayoutMasterSet(AbstractWmlConversionContext context) -
createSimplePageMaster
private static org.plutext.jaxb.xslfo.SimplePageMaster createSimplePageMaster(String masterName, PageDimensions page, String appendRegionName, boolean needBefore, boolean needAfter) -
getFactory
private static org.plutext.jaxb.xslfo.ObjectFactory getFactory()
-