Package org.docx4j.openpackaging.io

Examples of org.docx4j.openpackaging.io.SaveToZipFile.save()


        instancePkg);
   
    System.out.println("reverted? " + reverter.revert() );
   
    SaveToZipFile saver = new SaveToZipFile(instancePkg);
    saver.save(filepathprefix + "_reverted.docx");
    System.out.println("Saved: " + filepathprefix + "_reverted.docx");
   
  }
       
  public void extensionMissing(Exception e) {
View Full Code Here


    wordMLPackage.getMainDocumentPart().addParagraphOfText("some text").getContent().add(h);
   
    System.out.println( XmlUtils.marshaltoString(p, true)  );
   
    SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
    saver.save(outputfilepath);
  }
 
 
  /**
   * Surround the specified r in the specified p
View Full Code Here

   
    // Zip it up
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    SaveToZipFile saver = new SaveToZipFile(this);
    try {
      saver.save(baos);
      result = load(new ByteArrayInputStream(baos.toByteArray()));
    } catch (Docx4JException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

      drawingPart.setFriendlyIds(thisPart.map);     
      System.out.println( XmlUtils.marshaltoString(drawingPart.getJaxbElement(), true, true));
    }   
   
    SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
    saver.save(System.getProperty("user.dir")
        + "/SmartArt/OUT-clean.docx");
   
 
   
}
View Full Code Here

      main.addAltChunk(AltChunkType.WordprocessingML, new FileInputStream(chunkPath) );
    }
   
    if (save) {   
      SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
      saver.save(outputfilepath);
      System.out.println("Saved " + outputfilepath);
    }
  }
   
View Full Code Here

   
    CreateDocxWithSmartArt creatorDocx = new CreateDocxWithSmartArt(diagramLayoutObj, layoutTreeCreatorXslt, layoutTree2DiagramDataXslt);
    WordprocessingMLPackage pkg = creatorDocx.createSmartArtDocx(PageSizePaper.A3, true, MarginsWellKnown.NORMAL, doc);
   
    SaveToZipFile saver = new SaveToZipFile(pkg);
    saver.save(new File(System.getProperty("user.dir")+ "/OUT.docx"  ) );
    System.out.println("Done!");
  }
}
View Full Code Here

     */   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
   
    SaveToZipFile saver = new SaveToZipFile(spreadSheet);

    saver.save(baos);
    epp.setBinaryData(baos.toByteArray());

    // Write the new file to disk
    ppt.save(new java.io.File(outputfilepath));

View Full Code Here

            buildDrawingPartContentFromXmlString(imageRelID));
   
   
        // Save the xlsx
    SaveToZipFile saver = new SaveToZipFile(pkg);
    saver.save(outputfilepath);
    System.out.println("\n\n done .. " + outputfilepath)
  }
 
 
  /**
 
View Full Code Here

    }
   
    // Save the revised document   
    if (save) {   
      SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
      saver.save(outputfilepath);
      System.out.println("Document saved as " + outputfilepath);
    }
   
  }
View Full Code Here

     
      // Now that its loaded properly, lets just save it
     
      if (save) {
        SaveToZipFile saver = new SaveToZipFile(pmlPackage);
        saver.save(outputfilepath);
        System.out.println( "\n\n .. written to " + outputfilepath);
      } else {
        // Display its contents
        System.out.println( "\n\n..done " );
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.