Examples of insertDocument()


Examples of org.odftoolkit.odfdom.doc.OdfDocument.insertDocument()

    try {
      OdfTextDocument odtRootDoc = OdfTextDocument.newTextDocument();
      odtRootDoc.insertDocument(OdfTextDocument.newTextDocument(), "DOCA/");
      OdfDocument docA = odtRootDoc.loadSubDocument("DOCA");
      docA.newImage(ResourceUtilities.getURI(TEST_PIC));
      docA.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "../DOCB/");
      OdfFileDom contentA = docA.getContentDom();
      XPath xpath = contentA.getXPath();
      TextPElement lastPara = (TextPElement) xpath.evaluate("//text:p[last()]", contentA, XPathConstants.NODE);
      addFrameForEmbeddedDoc(contentA, lastPara, "DOCB");
      OdfDocument docB = odtRootDoc.loadSubDocument("DOCB/");
View Full Code Here

Examples of org.odftoolkit.odfdom.doc.OdfDocument.insertDocument()

    try {
      OdfTextDocument odtDoc1 = OdfTextDocument.newTextDocument();
      odtDoc1.insertDocument(OdfTextDocument.newTextDocument(), "DOCA/");
      OdfDocument docA = odtDoc1.loadSubDocument("DOCA");
      docA.newImage(ResourceUtilities.getURI(TEST_PIC));
      docA.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "DOCB/");
      OdfFileDom contentA = docA.getContentDom();
      XPath xpath = contentA.getXPath();
      TextPElement lastPara = (TextPElement) xpath.evaluate("//text:p[last()]", contentA, XPathConstants.NODE);
      addFrameForEmbeddedDoc(contentA, lastPara, "./DOCB");
      OdfDocument docB = odtDoc1.loadSubDocument("DOCA/DOCB/");
View Full Code Here

Examples of org.odftoolkit.odfdom.doc.OdfTextDocument.insertDocument()

    // Insert Image and make last paragraph its anchor
    odt.newImage(new URI("./MySampleImage.png"));

    // Insert new spreadsheet as sub document into the package within directory  "myOdsDirectoryPath/"
    odt.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "myOdsDirectoryPath");

    // Save file
    odt.save("ImageOut.odt");
  }
}
View Full Code Here

Examples of org.odftoolkit.odfdom.doc.OdfTextDocument.insertDocument()

   */
  @Test
  public void testembeddedDocumentsLocatedSideBySide() {
    try {
      OdfTextDocument odtRootDoc = OdfTextDocument.newTextDocument();
      odtRootDoc.insertDocument(OdfTextDocument.newTextDocument(), "DOCA/");
      OdfDocument docA = odtRootDoc.loadSubDocument("DOCA");
      docA.newImage(ResourceUtilities.getURI(TEST_PIC));
      docA.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "../DOCB/");
      OdfFileDom contentA = docA.getContentDom();
      XPath xpath = contentA.getXPath();
View Full Code Here

Examples of org.odftoolkit.odfdom.doc.OdfTextDocument.insertDocument()

   */
  @Test
  public void testembeddedDocumentWithSubPath() {
    try {
      OdfTextDocument odtDoc1 = OdfTextDocument.newTextDocument();
      odtDoc1.insertDocument(OdfTextDocument.newTextDocument(), "DOCA/");
      OdfDocument docA = odtDoc1.loadSubDocument("DOCA");
      docA.newImage(ResourceUtilities.getURI(TEST_PIC));
      docA.insertDocument(OdfSpreadsheetDocument.newSpreadsheetDocument(), "DOCB/");
      OdfFileDom contentA = docA.getContentDom();
      XPath xpath = contentA.getXPath();
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.