Package com.aspose.words

Examples of com.aspose.words.Paragraph


      wordDocBuilder.endRow();
      wordDocBuilder.endTable();
      // Add Comment
      Comment comment = new Comment(wordDoc);
      comment.setAuthor("D.Righetto");
      comment.getParagraphs().add(new Paragraph(wordDoc));
      comment.getFirstParagraph().getRuns().add(
          new Run(wordDoc, "My Comment text !!!"));
      wordDocBuilder.getCurrentParagraph().appendChild(comment);
      // Add break
      wordDocBuilder.insertBreak(BreakType.PAGE_BREAK);
View Full Code Here


    Document doc = new Document("data/document.doc");
    DocumentBuilder builder = new DocumentBuilder(doc);

    //Shows how to access the current node in a document builder.
    Node curNode = builder.getCurrentNode();
    Paragraph curParagraph = builder.getCurrentParagraph();
   
    // Shows how to move a cursor position to a specified node.
    builder.moveTo(doc.getFirstSection().getBody().getLastParagraph());
   
    // Shows how to move a cursor position to the beginning or end of a document.
View Full Code Here

    DocumentBuilder builder = new DocumentBuilder(doc);
    builder.write("Some text is added.");

    Comment comment = new Comment(doc, "Aspose", "As", new Date());
    builder.getCurrentParagraph().appendChild(comment);
    comment.getParagraphs().add(new Paragraph(doc));
    comment.getFirstParagraph().getRuns().add(new Run(doc, "Comment text."));

    doc.save("data/docx4j/Aspose_Comments.docx");
    System.out.println("Done.");
  }
View Full Code Here

        watermark.setWrapType(WrapType.NONE);
        watermark.setVerticalAlignment(VerticalAlignment.CENTER);
        watermark.setHorizontalAlignment(HorizontalAlignment.CENTER);

        // Create a new paragraph and append the watermark to this paragraph.
        Paragraph watermarkPara = new Paragraph(doc);
        watermarkPara.appendChild(watermark);

        // Insert the watermark into all headers of each document section.
        for (Section sect : doc.getSections())
        {
            // There could be up to three different headers in each section, since we want
View Full Code Here

    DocumentBuilder builder = new DocumentBuilder(doc);
    builder.write("Some text is added.");

    Comment comment = new Comment(doc, "Aspose", "As", new Date());
    builder.getCurrentParagraph().appendChild(comment);
    comment.getParagraphs().add(new Paragraph(doc));
    comment.getFirstParagraph().getRuns().add(new Run(doc, "Comment text."));

    doc.save("data/AsposeComments.docx");
  }
View Full Code Here

    // Insert the container after the original.
    firstTable.getParentNode().insertAfter(table, firstTable);

    // Add a buffer paragraph to ensure the tables stay apart.
    firstTable.getParentNode().insertAfter(new Paragraph(doc), firstTable);

    Row currentRow;

    do
    {
View Full Code Here

    Document doc = new Document("data/document.doc");
    DocumentBuilder builder = new DocumentBuilder(doc);

    //Shows how to access the current node in a document builder.
    Node curNode = builder.getCurrentNode();
    Paragraph curParagraph = builder.getCurrentParagraph();
   
    // Shows how to move a cursor position to a specified node.
    builder.moveTo(doc.getFirstSection().getBody().getLastParagraph());
   
    // Shows how to move a cursor position to the beginning or end of a document.
View Full Code Here

TOP

Related Classes of com.aspose.words.Paragraph

Copyright © 2018 www.massapicom. 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.