Package com.aspose.words

Examples of com.aspose.words.Document.save()


      /* Send document to client */
      response.setContentType("application/vnd.ms-word");
      response.addHeader("Content-Disposition",
          "inline;filename=myWordDocument.doc");
      wordDoc.save(response.getOutputStream(), SaveFormat.DOC);
      response.flushBuffer();
    } catch (Exception e) {
      throw new ServletException(e);
    }

View Full Code Here


      /* Send document to client */
      response.setContentType("application/vnd.ms-word");
      response.addHeader("Content-Disposition",
          "inline;filename=myWordDocument.doc");
      wordDoc.save(response.getOutputStream(), SaveFormat.DOC);
      response.flushBuffer();
    } catch (Exception e) {
      throw new ServletException(e);
    }
  }
View Full Code Here

    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

        firstTable.getRows().add(secondTable.getFirstRow());

    // Remove the empty table container.
    secondTable.remove();

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

    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

    Bookmark bookmark1 = doc.getRange().getBookmarks().get(0);
   
    // By name.
    Bookmark bookmark2 = doc.getRange().getBookmarks().get("AsposeBookmark");
   
    doc.save("data/docx4j/Aspose_Bookmark.doc", SaveFormat.DOC);
    System.out.println("Done.");
  }
}
View Full Code Here

  public static void main(String[] args) throws Exception
  {
    // Load the document from disk.
    Document doc = new Document("data/docx4j/document.doc");
   
    doc.save("data/docx4j/html/Aspose_DocToHTML.html",SaveFormat.HTML); //Save the document in HTML format.
    doc.save("data/docx4j/Aspose_DocToPDF.pdf",SaveFormat.PDF); //Save the document in PDF format.
    doc.save("data/docx4j/Aspose_DocToTxt.txt",SaveFormat.TEXT); //Save the document in TXT format.
    doc.save("data/docx4j/Aspose_DocToJPG.jpg",SaveFormat.JPEG); //Save the document in JPEG format.
       
        System.out.println("Aspose - Doc file converted in specified formats");
View Full Code Here

  {
    // Load the document from disk.
    Document doc = new Document("data/docx4j/document.doc");
   
    doc.save("data/docx4j/html/Aspose_DocToHTML.html",SaveFormat.HTML); //Save the document in HTML format.
    doc.save("data/docx4j/Aspose_DocToPDF.pdf",SaveFormat.PDF); //Save the document in PDF format.
    doc.save("data/docx4j/Aspose_DocToTxt.txt",SaveFormat.TEXT); //Save the document in TXT format.
    doc.save("data/docx4j/Aspose_DocToJPG.jpg",SaveFormat.JPEG); //Save the document in JPEG format.
       
        System.out.println("Aspose - Doc file converted in specified formats");
  }
View Full Code Here

    doc.protect(ProtectionType.READ_ONLY);
//    doc.protect(ProtectionType.ALLOW_ONLY_COMMENTS);
//    doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS);
//    doc.protect(ProtectionType.ALLOW_ONLY_REVISIONS);
   
    doc.save("data/AsposeProtect.doc", SaveFormat.DOC);
  }
}
View Full Code Here

    // Load the document from disk.
    Document doc = new Document("data/docx4j/document.doc");
   
    doc.save("data/docx4j/html/Aspose_DocToHTML.html",SaveFormat.HTML); //Save the document in HTML format.
    doc.save("data/docx4j/Aspose_DocToPDF.pdf",SaveFormat.PDF); //Save the document in PDF format.
    doc.save("data/docx4j/Aspose_DocToTxt.txt",SaveFormat.TEXT); //Save the document in TXT format.
    doc.save("data/docx4j/Aspose_DocToJPG.jpg",SaveFormat.JPEG); //Save the document in JPEG format.
       
        System.out.println("Aspose - Doc file converted in specified formats");
  }
}
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.