Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Last active April 8, 2019 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-cloud/5a72e646dc2cba15427e85ec53053e57 to your computer and use it in GitHub Desktop.
Save aspose-cloud/5a72e646dc2cba15427e85ec53053e57 to your computer and use it in GitHub Desktop.
The GIST contains Java Examples of Aspose.Words REST APIs.
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
AcceptAllRevisionsRequest request = new AcceptAllRevisionsRequest(fileName, null, null, null, null, null);
RevisionsModificationResponse result = wordsApi.acceptAllRevisions(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
String documentToAppend = "test_multi_pages.docx";
String folder = null; // File exists at the root of the storage
String destName = null; // // Changes will be made in the source document
// Upload original document to Cloud Storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
// Upload the document to append to Cloud Storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + documentToAppend), null, null);
DocumentEntry docEntry = new DocumentEntry().href(documentToAppend).importFormatMode("KeepSourceFormatting");
DocumentEntryList documentList = new DocumentEntryList().addDocumentEntriesItem(docEntry);
PostAppendDocumentRequest request = new PostAppendDocumentRequest(fileName, documentList, folder, null,
null, null, destName, null, null);
DocumentResponse result = wordsApi.postAppendDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
The GIST contains Java Examples of Aspose.Words Cloud APIs.
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to Cloud Storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
ClassifyDocumentRequest request = new ClassifyDocumentRequest(fileName, null, null, null,
null, null, null);
ClassificationResponse result = wordsApi.classifyDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to Cloud Storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
ClassifyDocumentRequest request = new ClassifyDocumentRequest(fileName, null, null, null,
null, null, null);
ClassificationResponse result = wordsApi.classifyDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName1 = "compareTestDoc1.doc";
String fileName2 = "compareTestDoc2.doc";
String dest_name = "TestCompareOut.doc";
CompareData compareData = new CompareData()
.author("author")
.comparingWithDocument(fileName2)
.dateTime(OffsetDateTime.now());
// Upload first input document to Cloud Storage
wordsApi.putCreate(fileName1, new File("src/main/resources/" + fileName1), null, null);
// Upload second input document to Cloud Storage
wordsApi.putCreate(fileName2, new File("src/main/resources/" + fileName2), null, null);
PostCompareDocumentRequest request = new PostCompareDocumentRequest(fileName1, compareData,
null, null, null, null, dest_name);
DocumentResponse result = wordsApi.postCompareDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
try {
// Configure WordsApi and StorageApi Objects
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey("").setAppSid("");
StorageApi storageApi = new StorageApi("https://api.aspose.cloud/v1.1", "", "");
// Upload HTML file to Cloud Storage
String fileName = "html_example.html";
File file = new File("src/main/resources/" + fileName);
ResponseMessage response = storageApi.PutCreate(fileName, null, null, file);
// Convert HTML file to Word
String destName = "html_example.docx";
SaveOptionsData saveOptionsData = new SaveOptionsData().saveFormat("docx").fileName(destName);
PostDocumentSaveAsRequest request = new PostDocumentSaveAsRequest(fileName, saveOptionsData, null, null,
null, null, null, null);
SaveResponse result = wordsApi.postDocumentSaveAs(request);
System.out.println("API Response: " + result);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "45.pdf";
String destName = "TestPostDocumentSaveAs.docx";
SaveOptionsData saveOptionsData = new SaveOptionsData().saveFormat("docx").fileName(destName);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostDocumentSaveAsRequest request = new PostDocumentSaveAsRequest(fileName, saveOptionsData,
null, null, null, null, destName, null);
SaveResponse result = wordsApi.postDocumentSaveAs(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String destName = "test_multi_pages.pdf";
SaveOptionsData saveOptionsData = new SaveOptionsData().saveFormat("pdf").fileName(destName);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostDocumentSaveAsRequest request = new PostDocumentSaveAsRequest(fileName, saveOptionsData,
null, null, null, null, destName, null);
SaveResponse result = wordsApi.postDocumentSaveAs(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String format = "pdf";
PutConvertDocumentRequest request = new PutConvertDocumentRequest(new File("src/main/resources/" + fileName), format,
null, null, null, null);
File result = wordsApi.putConvertDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String destName = "test_multi_pages.tiff";
TiffSaveOptionsData saveOptionsData = (TiffSaveOptionsData) new TiffSaveOptionsData().saveFormat("tiff").fileName(destName);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutDocumentSaveAsTiffRequest request = new PutDocumentSaveAsTiffRequest(fileName, saveOptionsData,
null,
null, null, null, destName, null, null, null,
null, null, null, null, null, null,
null, null, null, null, null, null,
null, null, null, null);
SaveResponse result = wordsApi.putDocumentSaveAsTiff(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "NewDocument.docx";
String folder = null; // Document will be created at the root of the storage
PutCreateDocumentRequest request = new PutCreateDocumentRequest(null, fileName, folder);
DocumentResponse result = wordsApi.putCreateDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String propertyName = "AsposeAuthor";
DocumentProperty prop = new DocumentProperty().builtIn(false).name(propertyName).value("Yaroslaw Ekimov");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
CreateOrUpdateDocumentPropertyRequest request = new CreateOrUpdateDocumentPropertyRequest(fileName,
propertyName, prop, null, null, null, null, null, null, null);
DocumentPropertyResponse result = wordsApi.createOrUpdateDocumentProperty(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "tables/1/rows/0/cells/0/";
String destName = "DeleteBorder.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteBorderRequest request = new DeleteBorderRequest(fileName, sourcePath, index,
null, null, null, null, destName, null, null);
BorderResponse result = wordsApi.deleteBorder(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
String sourcePath = "tables/1/rows/0/cells/0/";
String destName = "DeleteBorders.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteBordersRequest request = new DeleteBordersRequest(fileName, sourcePath,
null, null, null, null, destName, null, null);
BordersResponse result = wordsApi.deleteBorders(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteCommentRequest request = new DeleteCommentRequest(fileName, index, null, null, null, null,
null, null, null);
AsposeResponse result = wordsApi.deleteComment(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteDocumentMacrosRequest request = new DeleteDocumentMacrosRequest(fileName, null, null, null,
null, null, null, null);
AsposeResponse result = wordsApi.deleteDocumentMacros(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String propertyName = "testProp";
String destName = "DeleteDocumentProperty.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteDocumentPropertyRequest request = new DeleteDocumentPropertyRequest(fileName, propertyName,
null, null, null, null, destName, null, null);
AsposeResponse result = wordsApi.deleteDocumentProperty(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteDocumentWatermarkRequest request = new DeleteDocumentWatermarkRequest(fileName, null, null, null,
null, null, null, null);
DocumentResponse result = wordsApi.deleteDocumentWatermark(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteDrawingObjectRequest request = new DeleteDrawingObjectRequest(fileName, index, null, null, null,
null, null, null, null, null);
AsposeResponse result = wordsApi.deleteDrawingObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteFieldRequest request = new DeleteFieldRequest(fileName, index, null, null, null, null, null,
null, null, "sections/0/paragraphs/0");
AsposeResponse result = wordsApi.deleteField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteFieldsRequest request = new DeleteFieldsRequest(fileName, null, null, null, null, null, null, null,
"sections/0");
AsposeResponse result = wordsApi.deleteFields(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Footnote.doc";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteFootnoteRequest request = new DeleteFootnoteRequest(fileName, index, null, null, null, null,
null, null, null, null);
AsposeResponse result = wordsApi.deleteFootnote(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "FormFilled.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteFormFieldRequest request = new DeleteFormFieldRequest(fileName, index, null, null, null, null,
null, null, null, "sections/0");
AsposeResponse result = wordsApi.deleteFormField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteHeaderFooterRequest request = new DeleteHeaderFooterRequest(fileName, index, null, null, null,
null, null, null, null, null);
AsposeResponse result = wordsApi.deleteHeaderFooter(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteHeaderFooterRequest request = new DeleteHeaderFooterRequest(fileName, index, null, null, null,
null, null, null, null, null);
AsposeResponse result = wordsApi.deleteHeaderFooter(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "MathObjects.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteOfficeMathObjectRequest request = new DeleteOfficeMathObjectRequest(fileName, index,
null, null, null, null, null, null, null, null);
AsposeResponse result = wordsApi.deleteOfficeMathObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteParagraphRequest request = new DeleteParagraphRequest(fileName, index, null, null, null, null,
null, null, null, null);
AsposeResponse result = wordsApi.deleteParagraph(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Run.doc";
Integer index = 0;
String paragraphPath = "paragraphs/1";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteRunRequest request = new DeleteRunRequest(fileName, paragraphPath, index, null, null, null,
null, null, null, null);
AsposeResponse result = wordsApi.deleteRun(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteTableRequest request = new DeleteTableRequest(fileName, index, null, null, null, null, null, null,
null, null);
AsposeResponse result = wordsApi.deleteTable(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "sections/0/tables/2/rows/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteTableCellRequest request = new DeleteTableCellRequest(fileName, sourcePath, index, null, null,
null, null, null, null, null);
AsposeResponse result = wordsApi.deleteTableCell(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "tables/1";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteTableRowRequest request = new DeleteTableRowRequest(fileName, sourcePath, index, null, null, null,
null, null, null, null);
AsposeResponse result = wordsApi.deleteTableRow(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
GetAvailableFontsRequest request = new GetAvailableFontsRequest(null);
AvailableFontsResponse result = wordsApi.getAvailableFonts(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
String sourcePath = "sections/0/tables/2/rows/0";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetBorderRequest request = new GetBorderRequest(fileName, sourcePath, index, null, null, null, null);
BorderResponse result = wordsApi.getBorder(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
String sourcePath = "sections/0/tables/2/rows/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetBordersRequest request = new GetBordersRequest(fileName, sourcePath, null, null, null, null);
BordersResponse result = wordsApi.getBorders(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetCommentRequest request = new GetCommentRequest(fileName, index, null, null, null, null);
CommentResponse result = wordsApi.getComment(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetCommentsRequest request = new GetCommentsRequest(fileName, null, null, null, null);
CommentsResponse result = wordsApi.getComments(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String bookmarkName = "aspose";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentBookmarkByNameRequest request = new GetDocumentBookmarkByNameRequest(fileName, bookmarkName,
null, null, null, null);
BookmarkResponse result = wordsApi.getDocumentBookmarkByName(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentBookmarksRequest request = new GetDocumentBookmarksRequest(fileName, null, null, null, null);
BookmarksResponse result = wordsApi.getDocumentBookmarks(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentDrawingObjectByIndexRequest request = new GetDocumentDrawingObjectByIndexRequest(fileName,
index, null, null, null, null, "sections/0");
DrawingObjectResponse result = wordsApi.getDocumentDrawingObjectByIndex(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentDrawingObjectImageDataRequest request = new GetDocumentDrawingObjectImageDataRequest(fileName,
index, null, null, null, null, "sections/0");
File result = wordsApi.getDocumentDrawingObjectImageData(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "sample_EmbeddedOLE.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentDrawingObjectOleDataRequest request = new GetDocumentDrawingObjectOleDataRequest(fileName,
index, null, null, null, null, "sections/0");
File result = wordsApi.getDocumentDrawingObjectOleData(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentDrawingObjectsRequest request = new GetDocumentDrawingObjectsRequest(fileName, null,
null, null, null, "sections/0");
DrawingObjectsResponse result = wordsApi.getDocumentDrawingObjects(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentFieldNamesRequest request = new GetDocumentFieldNamesRequest(fileName, null, null, null,
null, null);
FieldNamesResponse result = wordsApi.getDocumentFieldNames(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentHyperlinkByIndexRequest request = new GetDocumentHyperlinkByIndexRequest(fileName, index,
null, null, null, null);
HyperlinkResponse result = wordsApi.getDocumentHyperlinkByIndex(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload document to Cloud Storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentRequest request = new GetDocumentRequest(fileName, null, null, null, null);
DocumentResponse result = wordsApi.getDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphRequest request = new GetDocumentParagraphRequest(fileName, index, null, null,
null, null, null);
ParagraphResponse result = wordsApi.getDocumentParagraph(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphFormatRequest request = new GetDocumentParagraphFormatRequest(fileName, index,
null, null, null, null, null);
ParagraphFormatResponse result = wordsApi.getDocumentParagraphFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
String paragraphPath = "paragraphs/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphRunRequest request = new GetDocumentParagraphRunRequest(fileName, paragraphPath,
index, null, null, null, null);
RunResponse result = wordsApi.getDocumentParagraphRun(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
String paragraphPath = "paragraphs/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphRunFontRequest request = new GetDocumentParagraphRunFontRequest(fileName,
paragraphPath, index, null, null, null, null);
FontResponse result = wordsApi.getDocumentParagraphRunFont(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String paragraphPath = "sections/0/paragraphs/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphRunsRequest request = new GetDocumentParagraphRunsRequest(fileName, paragraphPath,
null, null, null, null);
RunsResponse result = wordsApi.getDocumentParagraphRuns(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String paragraphPath = "sections/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentParagraphsRequest request = new GetDocumentParagraphsRequest(fileName, null, null, null,
null, paragraphPath);
ParagraphLinkCollectionResponse result = wordsApi.getDocumentParagraphs(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentPropertiesRequest request = new GetDocumentPropertiesRequest(fileName, null, null, null, null);
DocumentPropertiesResponse result = wordsApi.getDocumentProperties(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String propName = "Author";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentPropertyRequest request = new GetDocumentPropertyRequest(fileName, propName, null, null,
null, null);
DocumentPropertyResponse result = wordsApi.getDocumentProperty(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentProtectionRequest request = new GetDocumentProtectionRequest(fileName, null, null, null, null);
ProtectionDataResponse result = wordsApi.getDocumentProtection(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentStatisticsRequest request = new GetDocumentStatisticsRequest(fileName, null, null, null, null,
null, null, null);
StatDataResponse result = wordsApi.getDocumentStatistics(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String format = "text";
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentWithFormatRequest request = new GetDocumentWithFormatRequest(fileName, format, null, null,
null, null, null, null);
File result = wordsApi.getDocumentWithFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String format = "text";
String fileName = "test_multi_pages.docx";
String outPath = "TestGetDocumentWithFormat.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetDocumentWithFormatRequest request = new GetDocumentWithFormatRequest(fileName, format, null, null,
null, null, outPath, null);
File result = wordsApi.getDocumentWithFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFieldRequest request = new GetFieldRequest(fileName, index, null, null, null, null, "sections/0");
FieldResponse result = wordsApi.getField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFieldsRequest request = new GetFieldsRequest(fileName, null, null, null, null, "sections/0");
FieldsResponse result = wordsApi.getFields(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Footnote.doc";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFootnoteRequest request = new GetFootnoteRequest(fileName, index, null, null, null, null, null);
FootnoteResponse result = wordsApi.getFootnote(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Footnote.doc";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFootnotesRequest request = new GetFootnotesRequest(fileName, null, null, null, null, null);
FootnotesResponse result = wordsApi.getFootnotes(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "FormFilled.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFormFieldRequest request = new GetFormFieldRequest(fileName, index, null, null, null, null, "sections/0");
FormFieldResponse result = wordsApi.getFormField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "FormFilled.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetFormFieldsRequest request = new GetFormFieldsRequest(fileName, null, null, null, null, "sections/0");
FormFieldsResponse result = wordsApi.getFormFields(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetHeaderFooterRequest request = new GetHeaderFooterRequest(fileName, index, null, null, null, null, null);
HeaderFooterResponse result = wordsApi.getHeaderFooter(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
Integer index = 0;
Integer sectionIndex = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetHeaderFooterOfSectionRequest request = new GetHeaderFooterOfSectionRequest(fileName, index, sectionIndex,
null, null, null, null, null);
HeaderFooterResponse result = wordsApi.getHeaderFooterOfSection(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetHeaderFootersRequest request = new GetHeaderFootersRequest(fileName, null, null, null, null, null, null);
HeaderFootersResponse result = wordsApi.getHeaderFooters(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "MathObjects.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetOfficeMathObjectRequest request = new GetOfficeMathObjectRequest(fileName, index, null, null, null,
null, null);
OfficeMathObjectResponse result = wordsApi.getOfficeMathObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "MathObjects.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetOfficeMathObjectsRequest request = new GetOfficeMathObjectsRequest(fileName, null, null, null,
null, null);
OfficeMathObjectsResponse result = wordsApi.getOfficeMathObjects(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetSectionRequest request = new GetSectionRequest(fileName, index, null, null, null, null);
SectionResponse result = wordsApi.getSection(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetSectionPageSetupRequest request = new GetSectionPageSetupRequest(fileName, index, null, null, null, null);
SectionPageSetupResponse result = wordsApi.getSectionPageSetup(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetSectionsRequest request = new GetSectionsRequest(fileName, null, null, null, null);
SectionLinkCollectionResponse result = wordsApi.getSections(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTableRequest request = new GetTableRequest(fileName, index, null, null, null, null, null);
TableResponse result = wordsApi.getTable(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "sections/0/tables/2/rows/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTableCellRequest request = new GetTableCellRequest(fileName, sourcePath, index, null, null, null, null);
TableCellResponse result = wordsApi.getTableCell(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "sections/0/tables/2/rows/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTableCellFormatRequest request = new GetTableCellFormatRequest(fileName, sourcePath, index, null,
null, null, null);
TableCellFormatResponse result = wordsApi.getTableCellFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTablePropertiesRequest request = new GetTablePropertiesRequest(fileName, index, null, null, null,
null, null);
TablePropertiesResponse result = wordsApi.getTableProperties(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "tables/1";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTableRowRequest request = new GetTableRowRequest(fileName, sourcePath, index, null, null, null, null);
TableRowResponse result = wordsApi.getTableRow(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "sections/0/tables/2";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTableRowFormatRequest request = new GetTableRowFormatRequest(fileName, sourcePath, index, null, null,
null, null);
TableRowFormatResponse result = wordsApi.getTableRowFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
GetTablesRequest request = new GetTablesRequest(fileName, null, null, null, null, null);
TableLinkCollectionResponse result = wordsApi.getTables(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TestMailMergeWithImages.doc";
String destName = "TestMailMergeWithImages_Out.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
String data = new String(Files.readAllBytes(Paths.get("src/main/resources/", "MailMergeData.txt")), "utf8");
PostDocumentExecuteMailMergeRequest request = new PostDocumentExecuteMailMergeRequest(fileName, data,
null, null, null, null, null, null, null, null, destName);
DocumentResponse result = wordsApi.postDocumentExecuteMailMerge(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
TableInsert body = new TableInsert().columnsCount(3).rowsCount(5);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
InsertTableRequest request = new InsertTableRequest(fileName, null, null, null, null, null, null,
null, body, null);
TableResponse result = wordsApi.insertTable(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
TableCellInsert body = new TableCellInsert();
String sourcePath = "sections/0/tables/2/rows/0";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
InsertTableCellRequest request = new InsertTableCellRequest(fileName, sourcePath, null, null, null,
null, null, null, null, body);
TableCellResponse result = wordsApi.insertTableCell(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
TableRowInsert body = new TableRowInsert().columnsCount(5);
String sourcePath = "sections/0/tables/2";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
InsertTableRowRequest request = new InsertTableRowRequest(fileName, sourcePath, null, null, null,
null, null, null, null, body);
TableRowResponse result = wordsApi.insertTableRow(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "template.doc";
String destName = "PostDocumentExecuteMailMerge.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
String data = new String(Files.readAllBytes(Paths.get("src/main/resources/", "TestExecuteMailMergeData.txt")), "utf8");
PostDocumentExecuteMailMergeRequest request = new PostDocumentExecuteMailMergeRequest(fileName, data,
null, null, null, null, null, null, null, null, destName);
DocumentResponse result = wordsApi.postDocumentExecuteMailMerge(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleDocTemplate_Input.docx";
String destName = "PostExecuteTemplate.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
String data = new String(Files.readAllBytes(Paths.get("src/main/resources/", "TestExecuteTemplateData.txt")),
"utf8");
PostExecuteTemplateRequest request = new PostExecuteTemplateRequest(fileName, data, null, null, null, null,
null, null, null, destName);
DocumentResponse result = wordsApi.postExecuteTemplate(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
ProtectionRequest body = new ProtectionRequest().newPassword("");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostChangeDocumentProtectionRequest request = new PostChangeDocumentProtectionRequest(fileName, body, null,
null, null, null, null);
ProtectionDataResponse result = wordsApi.postChangeDocumentProtection(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
NodeLink link = new NodeLink().nodeId("0.0.3");
DocumentPosition documentPosition = new DocumentPosition().node(link).offset(0);
Comment body = new Comment().initial("YE").rangeStart(documentPosition).rangeEnd(documentPosition)
.author("Yaroslaw Ekimov").text("A new comment");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostCommentRequest request = new PostCommentRequest(fileName, index, body, null, null, null,
null, null, null, null);
CommentResponse result = wordsApi.postComment(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleMailMergeTemplate.docx";
String destName = "TestPostDocumentExecuteMailMerge.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
String data = new String(Files.readAllBytes(Paths.get("src/main/resources/", "SampleMailMergeTemplateData.txt")), "utf8");
PostDocumentExecuteMailMergeRequest request = new PostDocumentExecuteMailMergeRequest(fileName, data,
null, null, null, null, null, null, null, null, destName);
DocumentResponse result = wordsApi.postDocumentExecuteMailMerge(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
ParagraphFormat body = new ParagraphFormat().alignment(ParagraphFormat.AlignmentEnum.RIGHT);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostDocumentParagraphFormatRequest request = new PostDocumentParagraphFormatRequest(fileName, body, "", 0,
null, null, null, null, null, null, null);
ParagraphFormatResponse result = wordsApi.postDocumentParagraphFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
String paragraphPath = "paragraphs/0";
String destName = "postDocumentParagraphRunFont.docx";
Font body = new Font().bold(true);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostDocumentParagraphRunFontRequest request = new PostDocumentParagraphRunFontRequest(fileName, body,
paragraphPath, index, null, null, null, null, destName, null, null);
FontResponse result = wordsApi.postDocumentParagraphRunFont(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
File data = Paths.get("src/main/resources/", "aspose-cloud.png").toFile();
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostDrawingObjectRequest request = new PostDrawingObjectRequest(fileName, "{\"Left\": 0}", data,
index, null, null, null, null, null, null, null, null);
DrawingObjectResponse result = wordsApi.postDrawingObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TestExecuteTemplate.doc";
String destName = "TestPostExecuteTemplate.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
String data = new String(Files.readAllBytes(Paths.get("src/main/resources/", "TestExecuteTemplateData.txt")),
"utf8");
PostExecuteTemplateRequest request = new PostExecuteTemplateRequest(fileName, data, null, null, null, null,
null, null, null, destName);
DocumentResponse result = wordsApi.postExecuteTemplate(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
Integer index = 0;
Field body = (Field) new Field().fieldCode("{ NUMPAGES }").nodeId("0.0.3");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostFieldRequest request = new PostFieldRequest(fileName, body, index, null, null, null, null, null,
null, null, "sections/0/paragraphs/0");
FieldResponse result = wordsApi.postField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Footnote.doc";
Integer index = 0;
Footnote body = new Footnote().text("new text is here");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostFootnoteRequest request = new PostFootnoteRequest(fileName, body, index, null, null, null, null, null,
null, null, null);
FootnoteResponse result = wordsApi.postFootnote(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "FormFilled.docx";
String destName = "PostFormField.docx";
Integer index = 0;
FormField body = new FormFieldTextInput()
.textInputFormat("")
.textInputDefault("123")
.name("FullName")
.enabled(true)
.calculateOnExit(true)
.statusText("");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostFormFieldRequest request = new PostFormFieldRequest(fileName, body, index, null, null, null, null,
destName, null, null, null);
FormFieldResponse result = wordsApi.postFormField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Double rotationAngle = 0.0;
String destName = "InsertDocumentWatermarkImage.docx";
File image = Paths.get("src/main/resources/", "aspose-cloud.png").toFile();
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostInsertDocumentWatermarkImageRequest request = new PostInsertDocumentWatermarkImageRequest(fileName, image,
null, null, null, null, destName, null, null, rotationAngle, null);
DocumentResponse result = wordsApi.postInsertDocumentWatermarkImage(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String destName = "InsertDocumentWatermarkText.docx";
WatermarkText body = new WatermarkText().rotationAngle(90.0).text("This is the text");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostInsertDocumentWatermarkTextRequest request = new PostInsertDocumentWatermarkTextRequest(fileName, body,
null, null, null, null, destName, null, null);
DocumentResponse result = wordsApi.postInsertDocumentWatermarkText(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String destName = "PostInsertPageNumbers.docx";
PageNumber body = new PageNumber().format("{PAGE} of { NUMPAGES }").alignment("center").isTop(false);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostInsertPageNumbersRequest request = new PostInsertPageNumbersRequest(fileName, body, null,
null, null, null, destName, null, null);
DocumentResponse result = wordsApi.postInsertPageNumbers(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
SaveOptionsData saveOptionsData = new SaveOptionsData()
.colorMode("1")
.saveFormat("doc")
.fileName("google.doc")
.dmlRenderingMode("1")
.dmlEffectsRenderingMode("1")
.zipOutput(false)
.updateLastSavedTimeProperty(false);
LoadWebDocumentData body = new LoadWebDocumentData().loadingDocumentUrl("https://www.google.com/").saveOptions(saveOptionsData);
PostLoadWebDocumentRequest request = new PostLoadWebDocumentRequest(body,null);
SaveResponse result = wordsApi.postLoadWebDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String destName = "PostReplaceText.docx";
ReplaceTextRequest body = new ReplaceTextRequest().oldValue("aspose").newValue("aspose new");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostReplaceTextRequest request = new PostReplaceTextRequest(fileName, body, null, null, null, null,
destName, null, null);
ReplaceTextResponse result = wordsApi.postReplaceText(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Run.doc";
Integer index = 0;
String paragraphPath = "paragraphs/1";
Run body = (Run) new Run().text("Run with text");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostRunRequest request = new PostRunRequest(fileName, body, paragraphPath, index, null, null, null,
null, null, null, null);
RunResponse result = wordsApi.postRun(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String bookmarkName = "aspose";
String destName = "PostUpdateDocumentBookmark.docx";
BookmarkData body = new BookmarkData().name(bookmarkName).text("This will be the text for Aspose");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostUpdateDocumentBookmarkRequest request = new PostUpdateDocumentBookmarkRequest(fileName, body,
bookmarkName, null, null, null, null, destName, null, null);
BookmarkResponse result = wordsApi.postUpdateDocumentBookmark(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostUpdateDocumentFieldsRequest request = new PostUpdateDocumentFieldsRequest(fileName, null, null, null,
null, null);
DocumentResponse result = wordsApi.postUpdateDocumentFields(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
NodeLink link = new NodeLink().nodeId("0.0.3");
DocumentPosition documentPosition = new DocumentPosition().node(link).offset(0);
Comment body = new Comment().initial("YE").rangeStart(documentPosition).rangeEnd(documentPosition)
.author("Yaroslaw Ekimov").text("A new comment");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutCommentRequest request = new PutCommentRequest(fileName, body, null, null, null, null,
null, null, null);
CommentResponse result = wordsApi.putComment(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleExecuteTemplate.docx";
File file = Paths.get("src/main/resources/", fileName).toFile();
PutDocumentFieldNamesRequest request = new PutDocumentFieldNamesRequest(file, true);
FieldNamesResponse result = wordsApi.putDocumentFieldNames(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
File data = Paths.get("src/main/resources/", "aspose-cloud.png").toFile();
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutDrawingObjectRequest request = new PutDrawingObjectRequest(fileName, "{\"Left\": 0}", data, null,
null, null, null, null, null, null, null);
DrawingObjectResponse result = wordsApi.putDrawingObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleMailMergeTemplate.docx";
File file = Paths.get("src/main/resources/", fileName).toFile();
File data = Paths.get("src/main/resources/", "SampleMailMergeTemplateData.txt").toFile();
PutExecuteMailMergeOnlineRequest request = new PutExecuteMailMergeOnlineRequest(file, data,
null, null, null);
File result = wordsApi.putExecuteMailMergeOnline(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleExecuteTemplate.docx";
File file = Paths.get("src/main/resources/", fileName).toFile();
File data = Paths.get("src/main/resources/", "SampleExecuteTemplateData.txt").toFile();
PutExecuteTemplateOnlineRequest request = new PutExecuteTemplateOnlineRequest(file, data,
null, null, null, null);
File result = wordsApi.putExecuteTemplateOnline(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "GetField.docx";
Field body = (Field) new Field().fieldCode("{ NUMPAGES }").nodeId("0.0.3");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutFieldRequest request = new PutFieldRequest(fileName, body, null, null, null, null, null, null,
null, "sections/0/paragraphs/0", null);
FieldResponse result = wordsApi.putField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Footnote.doc";
Footnote body = new Footnote().text("new text is here").footnoteType(Footnote.FootnoteTypeEnum.ENDNOTE);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutFootnoteRequest request = new PutFootnoteRequest(fileName, body, null, null, null, null, null,
null, null, null);
FootnoteResponse result = wordsApi.putFootnote(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "FormFilled.docx";
String destName = "PutFormField.docx";
FormField body = new FormFieldTextInput()
.textInputFormat("UPPERCASE")
.textInputDefault("123")
.name("FullName")
.enabled(true)
.calculateOnExit(true)
.statusText("");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutFormFieldRequest request = new PutFormFieldRequest(fileName, body, null, null, null, null,
destName, null, null, "sections/0", null);
FormFieldResponse result = wordsApi.putFormField(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "HeadersFooters.doc";
String footerType = "FooterEven";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutHeaderFooterRequest request = new PutHeaderFooterRequest(fileName, footerType, null, null, null,
null, null, null, null, null);
HeaderFooterResponse result = wordsApi.putHeaderFooter(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String paragraphPath = "sections/0";
String destName = "putParagraph.docx";
ParagraphInsert body = new ParagraphInsert().text("This is a new paragraph for your document");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutParagraphRequest request = new PutParagraphRequest(fileName, body,
null, null, null,
null, destName, null, null, paragraphPath, null);
ParagraphResponse result = wordsApi.putParagraph(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
ProtectionRequest body = new ProtectionRequest().newPassword("123");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutProtectDocumentRequest request = new PutProtectDocumentRequest(fileName, body, null, null, null,
null, null);
ProtectionDataResponse result = wordsApi.putProtectDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "Run.doc";
String paragraphPath = "paragraphs/1";
Run body = (Run) new Run().text("Run with text");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PutRunRequest request = new PutRunRequest(fileName, paragraphPath, body, null, null, null, null,
null, null, null, null);
RunResponse result = wordsApi.putRun(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
ClassifyRequest request = new ClassifyRequest("Try text classification", "3");
ClassificationResponse result = wordsApi.classify(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_doc.docx";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RejectAllRevisionsRequest request = new RejectAllRevisionsRequest(fileName, null, null, null, null, null);
RevisionsModificationResponse result = wordsApi.rejectAllRevisions(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String format = "png";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RenderDrawingObjectRequest request = new RenderDrawingObjectRequest(fileName, format, index, null, null,
null, null, "sections/0", null);
File result = wordsApi.renderDrawingObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "MathObjects.docx";
Integer index = 0;
String format = "png";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RenderMathObjectRequest request = new RenderMathObjectRequest(fileName, format, index, null, null, null,
null, null, null);
File result = wordsApi.renderMathObject(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer pageNumber = 1;
String format = "png";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RenderPageRequest request = new RenderPageRequest(fileName, pageNumber, format, null, null, null,
null, null);
File result = wordsApi.renderPage(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
String format = "png";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RenderParagraphRequest request = new RenderParagraphRequest(fileName, format, index, null, null, null,
null,null, null);
File result = wordsApi.renderParagraph(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String format = "png";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
RenderTableRequest request = new RenderTableRequest(fileName, format, index, null, null, null, null,
null, null);
File result = wordsApi.renderTable(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
ResetCacheRequest request = new ResetCacheRequest();
AsposeResponse result = wordsApi.resetCache(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String pattern = "aspose";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
SearchRequest request = new SearchRequest(fileName, pattern, null, null, null, null);
SearchResponse result = wordsApi.search(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String format = "pdf";
String folder = null; // Because the resource document exists at the root of the storage
Integer from = null; // Splitting starts from the first page of the document
Integer to = null; // splitting ends at the last page of the document
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostSplitDocumentRequest request = new PostSplitDocumentRequest(fileName, folder,
null, null, null, null, format, from, to, null, null);
SplitDocumentResponse result = wordsApi.postSplitDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String format = "pdf";
String folder = null; // Because the resource document exists at the root of the storage
Integer from = 1; // The start page number for splitting
Integer to = 2; // The last page number for splitting
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostSplitDocumentRequest request = new PostSplitDocumentRequest(fileName, folder,
null, null, null, null, format, from, to, null, null);
SplitDocumentResponse result = wordsApi.postSplitDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
String format = "png";
String folder = null; // Because the resource document exists at the root of the storage
Integer from = 1; // The start page number for splitting
Integer to = 2; // The last page number for splitting
boolean zipOutput = true;
String destFileName = "test_multi_pages.zip";
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
PostSplitDocumentRequest request = new PostSplitDocumentRequest(fileName, folder,
null, null, null, destFileName, format, from, to, zipOutput, null);
SplitDocumentResponse result = wordsApi.postSplitDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "SampleProtectedBlankWordDocument.docx";
ProtectionRequest body = new ProtectionRequest().password("aspose");
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
DeleteUnprotectDocumentRequest request = new DeleteUnprotectDocumentRequest(fileName, body, null,
null, null, null, null);
ProtectionDataResponse result = wordsApi.deleteUnprotectDocument(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
String sourcePath = "tables/1/rows/0/cells/0/";
Border body = new Border().borderType(Border.BorderTypeEnum.LEFT).color(new XmlColor().alpha(2)).distanceFromText(6.0)
.lineStyle(Border.LineStyleEnum.DASHDOTSTROKER).lineWidth(2.0).shadow(true);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
UpdateBorderRequest request = new UpdateBorderRequest(fileName, body, sourcePath, index, null, null, null,
null, null, null, null);
BorderResponse result = wordsApi.updateBorder(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "test_multi_pages.docx";
Integer index = 0;
PageSetup body = new PageSetup().rtlGutter(true).leftMargin(10.0)
.orientation(PageSetup.OrientationEnum.LANDSCAPE).paperSize(PageSetup.PaperSizeEnum.A5);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
UpdateSectionPageSetupRequest request = new UpdateSectionPageSetupRequest(fileName, index, body, null,
null, null, null, null, null, null);
SectionPageSetupResponse result = wordsApi.updateSectionPageSetup(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
TableCellFormat body = new TableCellFormat().wrapText(true)
.bottomPadding(5.0).fitText(true).horizontalMerge(TableCellFormat.HorizontalMergeEnum.FIRST);
String sourcePath = "sections/0/tables/2/rows/0";
Integer index = 0;
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
UpdateTableCellFormatRequest request = new UpdateTableCellFormatRequest(fileName, sourcePath, index,
null, null, null, null, null, null, null, body);
TableCellFormatResponse result = wordsApi.updateTableCellFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
TableProperties body = new TableProperties().alignment(TableProperties.AlignmentEnum.RIGHT)
.allowAutoFit(false).bidi(true).bottomPadding(1.0).cellSpacing(2.0).leftIndent(3.0)
.rightPadding(5.0).styleOptions(TableProperties.StyleOptionsEnum.COLUMNBANDS).topPadding(6.0);
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
UpdateTablePropertiesRequest request = new UpdateTablePropertiesRequest(fileName, index, null, null, null,
null, null, null, null, body, null);
TablePropertiesResponse result = wordsApi.updateTableProperties(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-java
String APP_KEY = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
String APP_SID = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(new ApiClient());
ApiClient client = wordsApi.getApiClient();
client.setAppKey(APP_KEY).setAppSid(APP_SID);
try {
String fileName = "TablesGet.docx";
Integer index = 0;
TableRowFormat body = new TableRowFormat().allowBreakAcrossPages(true).headingFormat(true)
.height(10.0).heightRule(TableRowFormat.HeightRuleEnum.AUTO);
String sourcePath = "sections/0/tables/2";
// Upload input document to cloud storage
wordsApi.putCreate(fileName, new File("src/main/resources/" + fileName), null, null);
UpdateTableRowFormatRequest request = new UpdateTableRowFormatRequest(fileName, sourcePath, index,
null, null, null, null, null, null, null, body);
TableRowFormatResponse result = wordsApi.updateTableRowFormat(request);
} catch (Exception e) {
System.out.println(e.getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment