Examples of newImage()


Examples of org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph.newImage()

        p.newLineBreak();
        p.newLineBreak();
        p.newLineBreak();
        p.newText ("EMF image with 150 % height");
        p.newLineBreak();
        RtfExternalGraphic imageA = p.newImage ();
        imageA.setURL (file + "emf");
        imageA.setHeight ("150%");
        p.newLineBreak();
        p.close();
View Full Code Here

Examples of org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph.newImage()

        p.newLineBreak();
        p.newLineBreak();
        p.newLineBreak();
        p.newText ("EMF image with 150 % height");
        p.newLineBreak();
        RtfExternalGraphic imageA = p.newImage ();
        imageA.setURL (file + "emf");
        imageA.setHeight ("150%");
        p.newLineBreak();
        p.close();
View Full Code Here

Examples of org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph.newImage()

        p.newLineBreak();
        p.newLineBreak();
        p.newLineBreak();
        p.newText ("EMF image with 150 % height");
        p.newLineBreak();
        RtfExternalGraphic imageA = p.newImage ();
        imageA.setURL (file + "emf");
        imageA.setHeight ("150%");
        p.newLineBreak();
        p.close();
View Full Code Here

Examples of org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph.newImage()

        p.newLineBreak();
        p.newLineBreak();
        p.newLineBreak();
        p.newText ("EMF image with 150 % height");
        p.newLineBreak();
        RtfExternalGraphic imageA = p.newImage ();
        imageA.setURL (file + "emf");
        imageA.setHeight ("150%");
        p.newLineBreak();
        p.close();
View Full Code Here

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

  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();
      TextPElement lastPara = (TextPElement) xpath.evaluate("//text:p[last()]", contentA, XPathConstants.NODE);
      addFrameForEmbeddedDoc(contentA, lastPara, "DOCB");
View Full Code Here

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

      TextPElement lastPara = (TextPElement) xpath.evaluate("//text:p[last()]", contentA, XPathConstants.NODE);
      addFrameForEmbeddedDoc(contentA, lastPara, "DOCB");
      OdfDocument docB = odtRootDoc.loadSubDocument("DOCB/");
      Assert.assertNotNull(docB);
      Assert.assertNull(odtRootDoc.loadSubDocument("DOCA/DOCB/"));
      docB.newImage(ResourceUtilities.getURI(TEST_PIC_ANOTHER));
      OdfTable table1 = docB.getTableList().get(0);
      table1.setTableName("NewTable");
      updateFrameForEmbeddedDoc(contentA, "./DOCB", "DOCA/DOCB");
      //if user want to save the docA with the side by side embedded document
      //he has to insert it to the sub document of docA and update the xlink:href link
View Full Code Here

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

  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();
      TextPElement lastPara = (TextPElement) xpath.evaluate("//text:p[last()]", contentA, XPathConstants.NODE);
      addFrameForEmbeddedDoc(contentA, lastPara, "./DOCB");
View Full Code Here

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

      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/");
      docB.newImage(ResourceUtilities.getURI(TEST_PIC_ANOTHER));
      OdfTable table1 = docB.getTableList().get(0);
      table1.setTableName("NewTable");
      Assert.assertNotNull(docB);
      Assert.assertNull(odtDoc1.loadSubDocument("DOCB/"));
      docA.save(TEST_FILE_FOLDER + TEST_FILE_EMBEDDED_INCLUDED_SAVE_OUT);
View Full Code Here

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

      LOG.log(Level.INFO, "First para: {0}", header.getTextContent());
      OdfTextSpan spanElem = new OdfTextSpan(embedContentDom);
      spanElem.setTextContent(TEST_SPAN_TEXT);
      header.appendChild(spanElem);
      //insert image to "Object 1"
      embeddedDoc.newImage(ResourceUtilities.getURI(TEST_PIC));
      //embed "Object 1" to TestModifiedEmbeddedDoc.odt as the path /DocA
      String embedPath = "DocA";
      saveDoc.insertDocument(embeddedDoc, embedPath);
      saveDoc.save(TEST_FILE_FOLDER + TEST_FILE_MODIFIED_EMBEDDED);
      saveDoc.close();
View Full Code Here

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

      Assert.assertTrue(header.getTextContent().contains(TEST_SPAN_TEXT));
      header.setTextContent("");
      String packagePath = embeddedDoc.getDocumentPath() + SLASH + OdfPackage.OdfFile.IMAGE_DIRECTORY.getPath() + SLASH + TEST_PIC;
      OdfFileEntry imageEntry = embeddedDoc.getPackage().getFileEntry(packagePath);
      Assert.assertNotNull(imageEntry);
      embeddedDoc.newImage(ResourceUtilities.getURI(TEST_PIC_ANOTHER));
      //save the "DocA" as the standalone document
      embeddedDoc.save(TEST_FILE_FOLDER + TEST_FILE_MODIFIED_EMBEDDED_SAVE_STANDALONE);
      //load the standalone document and check the content
      OdfDocument standaloneDoc = OdfDocument.loadDocument(ResourceUtilities.getAbsolutePath(TEST_FILE_MODIFIED_EMBEDDED_SAVE_STANDALONE));
      embedContentDom = standaloneDoc.getContentDom();
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.