Class DocumentUtil


  • public class DocumentUtil
    extends Object
    • Constructor Detail

      • DocumentUtil

        public DocumentUtil()
    • Method Detail

      • prepareDocumentForInsert

        public static List<Object> prepareDocumentForInsert​(org.docx4j.openpackaging.packages.WordprocessingMLPackage sourceDocument,
                                                            org.docx4j.openpackaging.packages.WordprocessingMLPackage destDocument)
                                                     throws Exception
        Recursively walk through the content accessor to replace embedded images and import the matching files to the destination document before importing content.
        Parameters:
        sourceDocument - document to import.
        destDocument - document to add the source document content to.
        Returns:
        the whole content of the source document with imported images replaced.
        Throws:
        Exception