Page 1 of 1

Plutext Merge Document error shows an error

PostPosted: Tue Dec 03, 2019 1:49 am
by kapil
We are using the plutext to merge the code.Merged document shows the following error message


Individual documents we are trying to merge do not show this error , is there a reason we see this error on the merged content ?

Setting we are using to merge the document :
Code: Select all

          String[] files = {
            C:\\1.docx",
            "C:\\2.docx"
      };
      List<BlockRange> blockRanges = new ArrayList<BlockRange>();
      for (int i=0 ; i< files.length; i++) {
         BlockRange block = new BlockRange(WordprocessingMLPackage.load(
               new File(files[i])));
         blockRanges.add(block);
      
         
           block.setNumberingHandler(NumberingHandler.USE_EARLIER);
          
           block.setSectionBreakBefore(SectionBreakBefore.NEXT_PAGE);
          
           block.setHeaderBehaviour(HfBehaviour.DEFAULT);
           block.setFooterBehaviour(HfBehaviour.DEFAULT);

         
           block.setRestartPageNumbering(false);
         
         if (i>0) {
         block.setStyleHandler(StyleHandler.RENAME_RETAIN);
         }
         }

         // Perform the actual merge
         DocumentBuilder documentBuilder = new DocumentBuilder();
         WordprocessingMLPackage output = documentBuilder.buildOpenDocument(blockRanges);
         SaveToZipFile saver = new SaveToZipFile(output);
         saver.save("C:\\OUT_MergeWholeDocumentsUsingBlockRange.docx");

Re: Plutext Merge Document error shows an error

PostPosted: Thu Dec 05, 2019 7:13 am
by jason
To diagnose, we'll need to see your input documents.

For support with the Enterprise release, please email support@plutext.com