Java Code Examples for org.docx4j.XmlUtils#treeCopy()
The following examples show how to use
org.docx4j.XmlUtils#treeCopy() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LayoutMasterSetBuilder.java From docx4j-export-FO with Apache License 2.0 | 6 votes |
/** * For XSLFOExporterNonXSLT * @since 3.0 * */ public static void appendLayoutMasterSetFragment(AbstractWmlConversionContext context, Node foRoot) { LayoutMasterSet lms = getFoLayoutMasterSet(context); // Set suitable extents, for which we need area tree FOSettings foSettings = (FOSettings)context.getConversionSettings(); if ( !foSettings.lsLayoutMasterSetCalculationInProgress()) // Avoid infinite loop // Can't just do it where foSettings.getApacheFopMime() is not MimeConstants.MIME_FOP_AREA_TREE, // since TOC functionality uses that. { fixExtents( lms, context, false); } org.w3c.dom.Document document = XmlUtils.marshaltoW3CDomDocument(lms, Context.getXslFoContext() ); XmlUtils.treeCopy(document.getDocumentElement(), foRoot); }