Package com.aspose.words

Examples of com.aspose.words.DocumentBuilder.writeln()


      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setVerticalAlignment(
          CellVerticalAlignment.CENTER);
      cell.getCellFormat().setOrientation(TextOrientation.HORIZONTAL);
      cell.getCellFormat().setHorizontalMerge(CellMerge.FIRST);
      wordDocBuilder.writeln("Row 3 Cell 3 Text");
      cell = wordDocBuilder.insertCell();
      cell.getCellFormat().setHorizontalMerge(CellMerge.PREVIOUS);
      wordDocBuilder.endRow();
      wordDocBuilder.endTable();
      // Add Comment
View Full Code Here


    // 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.
    builder.moveToDocumentEnd();
    builder.writeln("This is the end of the document.");

    builder.moveToDocumentStart();
    builder.writeln("This is the beginning of the document.");
   
    doc.save("data/AsposeMovingCursor.doc");
View Full Code Here

    // Shows how to move a cursor position to the beginning or end of a document.
    builder.moveToDocumentEnd();
    builder.writeln("This is the end of the document.");

    builder.moveToDocumentStart();
    builder.writeln("This is the beginning of the document.");
   
    doc.save("data/AsposeMovingCursor.doc");
   
    System.out.println("Done.");
  }
View Full Code Here

  {
    Document doc = new Document();
    DocumentBuilder builder = new DocumentBuilder(doc);
   
    builder.startBookmark("AsposeBookmark");
    builder.writeln("Text inside a bookmark.");
    builder.endBookmark("AsposeBookmark");
   
    // By index.
    Bookmark bookmark1 = doc.getRange().getBookmarks().get(0);
   
View Full Code Here

   
    // DocumentBuilder provides members to easily add content to a document.
    DocumentBuilder builder = new DocumentBuilder(doc);
    // Write a new paragraph in the document with some text as "Sample Content..."
    builder.setBold(true);
    builder.writeln("Aspose Sample Content for Word file.\r More Sample");

    String text = doc.getText();
    System.out.println("Doc Text: " + text);

    //Replace "\r" control character with "\r\n"
View Full Code Here

    // Set the borders for the entire table.
    table.setBorders(LineStyle.SINGLE, 2.0, Color.BLACK);
    // Set the cell shading for this cell.
    builder.getCellFormat().getShading().setBackgroundPatternColor(Color.DARK_GRAY);
    builder.writeln("Cell #1");

    builder.insertCell();
    // Specify a different cell shading for the second cell.
    builder.getCellFormat().getShading().setBackgroundPatternColor(Color.blue);
    builder.writeln("Cell #2");
View Full Code Here

    builder.writeln("Cell #1");

    builder.insertCell();
    // Specify a different cell shading for the second cell.
    builder.getCellFormat().getShading().setBackgroundPatternColor(Color.blue);
    builder.writeln("Cell #2");

    // End this row.
    builder.endRow();

    // Clear the cell formatting from previous operations.
View Full Code Here

    // compared to the borders set for the table.
    builder.getCellFormat().getBorders().getLeft().setLineWidth(4.0);
    builder.getCellFormat().getBorders().getRight().setLineWidth(4.0);
    builder.getCellFormat().getBorders().getTop().setLineWidth(4.0);
    builder.getCellFormat().getBorders().getBottom().setLineWidth(4.0);
    builder.writeln("Cell #3");

    builder.insertCell();
    // Clear the cell formatting from the previous cell.
    builder.getCellFormat().clearFormatting();
    builder.writeln("Cell #4");
View Full Code Here

    builder.writeln("Cell #3");

    builder.insertCell();
    // Clear the cell formatting from the previous cell.
    builder.getCellFormat().clearFormatting();
    builder.writeln("Cell #4");

    doc.save("data/Aspose_styledTable.doc");
   
        System.out.println("Process Completed Successfully");
  }
View Full Code Here

    paragraphFormat.setLeftIndent(50);
    paragraphFormat.setRightIndent(50);
    paragraphFormat.setSpaceAfter(25);

    // Output text
    builder.writeln("I'm a very nice formatted paragraph. I'm intended to demonstrate how the left and right indents affect word wrapping.");
   
    // Set font formatting properties
    Font font = builder.getFont();
    font.setBold(true);
    font.setColor(Color.BLUE);
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.