Package com.adobe.dp.epub.ops

Examples of com.adobe.dp.epub.ops.OPSDocument.createElement()


      // chapter XHTML body element
      Element body1 = chapter1Doc.getBody();

      // add a header
      Element header1 = chapter1Doc.createElement("h1");
      header1.add("One");
      body1.add(header1);

      // add a paragraph
      Element paragraph1 = chapter1Doc.createElement("p");
View Full Code Here


      Element header1 = chapter1Doc.createElement("h1");
      header1.add("One");
      body1.add(header1);

      // add a paragraph
      Element paragraph1 = chapter1Doc.createElement("p");
      StringBuffer sb1 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb1.append("This is sentence " + i
            + " of the first chapter's first paragraph. ");
      paragraph1.add(sb1.toString());
View Full Code Here

      t3.add("G");
      label2.add(t3);
      svg.add(label2);

      // create a small paragraph to use as a link target
      Element target = chapter1Doc.createElement("p");
      target.add("Link in the second chapter points here.");
      body1.add(target);

      // create second chapter resource
      OPSResource chapter2 = epub.createOPSResource("OPS/chapter2.html");
View Full Code Here

      Element header2 = chapter1Doc.createElement("h1");
      header2.add("Two");
      body2.add(header2);

      // add a paragraph
      Element paragraph2 = chapter2Doc.createElement("p");
      StringBuffer sb2 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb2.append("This is sentence " + i
            + " of the second chapter's first paragraph. ");
      paragraph2.add(sb2.toString());
View Full Code Here

          "cassini.jpg");
      BitmapImageResource imageResource = epub.createBitmapImageResource(
          "OPS/images/cassini.jpg", "image/jpeg", dataSource);

      // add a bitmap image
      Element container = chapter2Doc.createElement("p");
      container.setClassName("container");
      body2.add(container);
      ImageElement bitmap = chapter2Doc.createImageElement("img");
      bitmap.setClassName("bitmap");
      bitmap.setImageResource(imageResource);
View Full Code Here

      bitmap.setClassName("bitmap");
      bitmap.setImageResource(imageResource);
      container.add(bitmap);

      // and another paragraph
      Element paragraph3 = chapter2Doc.createElement("p");
      StringBuffer sb3 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb3.append("This is sentence " + i
            + " of the second chapter's second paragraph. ");
      paragraph3.add(sb3.toString());
View Full Code Here

      // chapter XHTML body element
      Element body1 = chapter1Doc.getBody();

      // add a header
      Element header1 = chapter1Doc.createElement("h1");
      header1.add("One");
      body1.add(header1);

      // add a paragraph
      Element paragraph1 = chapter1Doc.createElement("p");
View Full Code Here

      Element header1 = chapter1Doc.createElement("h1");
      header1.add("One");
      body1.add(header1);

      // add a paragraph
      Element paragraph1 = chapter1Doc.createElement("p");
      StringBuffer sb1 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb1.append("This is sentence " + i
            + " of the first chapter's first paragraph. ");
      paragraph1.add(sb1.toString());
View Full Code Here

      Element header2 = chapter1Doc.createElement("h1");
      header2.add("Two");
      body2.add(header2);

      // add a paragraph
      Element paragraph2 = chapter2Doc.createElement("p");
      StringBuffer sb2 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb2.append("This is sentence " + i
            + " of the second chapter's first paragraph. ");
      paragraph2.add(sb2.toString());
View Full Code Here

            + " of the second chapter's first paragraph. ");
      paragraph2.add(sb2.toString());
      body2.add(paragraph2);

      // and another one
      Element paragraph3 = chapter2Doc.createElement("p");
      StringBuffer sb3 = new StringBuffer();
      for (int i = 1; i <= 6; i++)
        sb3.append("This is sentence " + i
            + " of the second chapter's second paragraph. ");
      paragraph3.add(sb3.toString());
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.