Last active
January 15, 2019 07:13
-
-
Save mmsajjad-aspose/e204c72065011ed1357c532edc9faa27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestAcceptAllRevisions.docx"; | |
WordsApi wordsAPI=WordsAPIInitialize.getWordsAPI(); | |
wordsAPI.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
AcceptAllRevisionsRequest request = new AcceptAllRevisionsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null); | |
RevisionsModificationResponse result = WordsAPIInitialize.wordsApi.acceptAllRevisions(request); | |
System.out.println(result.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostChangeDocumentProtection.docx"; | |
WordsApi wordsAPI=WordsAPIInitialize.getWordsAPI(); | |
ProtectionRequest body = new ProtectionRequest().newPassword(""); | |
wordsAPI.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ChangeDocumentProtection", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostChangeDocumentProtectionRequest request = new PostChangeDocumentProtectionRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ChangeDocumentProtection").toString(), null, null, null, null); | |
ProtectionDataResponse result = WordsAPIInitialize.wordsApi.postChangeDocumentProtection(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "Source.docx"; | |
WordsApi wordsAPI=WordsAPIInitialize.getWordsAPI(); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ClasifyDocument", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
ClassifyDocumentRequest request = new ClassifyDocumentRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ClasifyDocument").toString(), null, null, null, null, null); | |
ClassificationResponse result = WordsAPIInitialize.wordsApi.classifyDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "Source.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ClassifyTaxonomy", remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
ClassifyDocumentRequest request = new ClassifyDocumentRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "ClassifyTaxonomy").toString(), null, null, null, null, | |
"documents"); | |
ClassificationResponse result = WordsAPIInitialize.wordsApi.classifyDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutCreateDocument.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PutCreateDocumentRequest request = new PutCreateDocumentRequest(null, remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString()); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.putCreateDocument(request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocument.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentRequest request = new GetDocumentRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.getDocument(request); | |
System.out.println(result); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName1 = "compareTestDoc1.doc"; | |
String fileName2 = "compareTestDoc2.doc"; | |
String remoteName1 = "TestPostCompareDocument1.doc"; | |
String remoteName2 = "TestPostCompareDocument2.doc"; | |
String dest_name = Paths.get(WordsAPIInitialize.RemoteTestOut, "TestCompareOut.doc").toString(); | |
CompareData compareData = new CompareData().author("author") | |
.comparingWithDocument(Paths.get(WordsAPIInitialize.RemoteTestFolder, "CompareDocument", remoteName2).toString()) | |
.dateTime(OffsetDateTime.now()); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "CompareDocument", remoteName1).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "CompareDocument", fileName1).toString()), null, null); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "CompareDocument", remoteName2).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "CompareDocument", fileName2).toString()), null, null); | |
PostCompareDocumentRequest request = new PostCompareDocumentRequest(remoteName1, compareData, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "CompareDocument").toString(), null, null, null, dest_name); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postCompareDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutUpdateDocumentProperty.docx"; | |
String propertyName = "AsposeAuthor"; | |
DocumentProperty prop = new DocumentProperty().builtIn(false).name(propertyName).value("Yaroslaw Ekimov"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "CreateOrUpdateDocumentProperty", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
CreateOrUpdateDocumentPropertyRequest request = new CreateOrUpdateDocumentPropertyRequest(remoteName, | |
propertyName, prop, Paths.get(WordsAPIInitialize.RemoteTestFolder, "CreateOrUpdateDocumentProperty").toString(), null, null, | |
null, null, null, null); | |
DocumentPropertyResponse result = WordsAPIInitialize.wordsApi.createOrUpdateDocumentProperty(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestDeleteTableBorder.docx"; | |
Integer index = 0; | |
String sourcePath = "tables/1/rows/0/cells/0/"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteBorder", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteBorder", fileName).toString()), | |
null, null); | |
DeleteBorderRequest request = new DeleteBorderRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteBorder").toString(), null, null, | |
null, destName, null, null); | |
BorderResponse result = WordsAPIInitialize.wordsApi.deleteBorder(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestDeleteTableBorders.docx"; | |
String sourcePath = "tables/1/rows/0/cells/0/"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteBorders", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteBorders", fileName).toString()), | |
null, null); | |
DeleteBordersRequest request = new DeleteBordersRequest(remoteName, sourcePath, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteBorders").toString(), null, null, | |
null, destName, null, null); | |
BordersResponse result = WordsAPIInitialize.wordsApi.deleteBorders(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestDeleteComment.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteComments", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
DeleteCommentRequest request = new DeleteCommentRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteComments").toString(), null, null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteComment(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestDeleteDocumentMacros.doc"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentMacros", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
DeleteDocumentMacrosRequest request = new DeleteDocumentMacrosRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentMacros").toString(), null, null, | |
null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteDocumentMacros(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestDeleteDocumentProperty.docx"; | |
String propertyName = "testProp"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentProperty", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
DeleteDocumentPropertyRequest request = new DeleteDocumentPropertyRequest(remoteName, propertyName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentProperty").toString(), null, null, null, destName, null, | |
null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteDocumentProperty(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestDeleteDocumentWatermark.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentWatermark", remoteName).toString().replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
DeleteDocumentWatermarkRequest request = new DeleteDocumentWatermarkRequest(remoteName, Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDocumentWatermark").toString(), null, null, null, null, null, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.deleteDocumentWatermark(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx";String remoteName = "TestDeleteDrawingObject.docx";Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDrawingObjects", remoteName).toString().replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
DeleteDrawingObjectRequest request = new DeleteDrawingObjectRequest(remoteName, index, Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteDrawingObjects").toString(), null, null, null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteDrawingObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx";String remoteName = "TestDeleteField.docx";Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteField", remoteName).toString().replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteField", fileName).toString()), null, null); | |
DeleteFieldRequest request = new DeleteFieldRequest(remoteName, index, Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteField").toString(), null, null, null, null, null, null, "sections/0/paragraphs/0"); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx"; | |
String remoteName = "TestDeleteFields.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFields", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteFields", fileName).toString()), | |
null, null); | |
DeleteFieldsRequest request = new DeleteFieldsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFields").toString(), | |
null, null, null, null, null, | |
null, "sections/0"); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteFields(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "Footnote.doc"; | |
String remoteName = "TestDeleteFootnote.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFootnotes", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteFootnotes", fileName).toString()), | |
null, null); | |
DeleteFootnoteRequest request = new DeleteFootnoteRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFootnotes").toString(), | |
null, null, null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteFootnote(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "FormFilled.docx"; | |
String remoteName = "TestDeleteFormField.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFormFields", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteFormFields", fileName).toString()), | |
null, null); | |
DeleteFormFieldRequest request = new DeleteFormFieldRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteFormFields").toString(), null, null, | |
null, null, null, null, "sections/0"); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteFormField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "MathObjects.docx"; | |
String remoteName = "TestDeleteOfficeMathObject.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteOfficeMathsObjects", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteOfficeMathsObjects", fileName).toString()), | |
null, null); | |
DeleteOfficeMathObjectRequest request = new DeleteOfficeMathObjectRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteOfficeMathsObjects").toString(), null, null, | |
null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteOfficeMathObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestDeleteParagraph.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteParagraph", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
DeleteParagraphRequest request = new DeleteParagraphRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteParagraph").toString(), null, null, | |
null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteParagraph(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestDeleteTableCell.docx"; | |
Integer index = 0; | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTableCell", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteTableCell", fileName).toString()), | |
null, null); | |
DeleteTableCellRequest request = new DeleteTableCellRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTableCell").toString(), null, null, | |
null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteTableCell(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestDeleteTable.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTable", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteTable", fileName).toString()), | |
null, null); | |
DeleteTableRequest request = new DeleteTableRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTable").toString(), null, null, | |
null, null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteTable(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestDeleteTableRow.docx"; | |
Integer index = 0; | |
String sourcePath = "tables/1"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTableRow", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteTableRow", fileName).toString()), | |
null, null); | |
DeleteTableRowRequest request = new DeleteTableRowRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteTableRow").toString(), null, null, | |
null, null, null, null); | |
AsposeResponse result = WordsAPIInitialize.wordsApi.deleteTableRow(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "SampleProtectedBlankWordDocument.docx"; | |
String remoteName = "TestDeleteUnprotectDocument.docx"; | |
ProtectionRequest body = new ProtectionRequest().password("aspose"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteUnprotectDocument", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "DeleteUnprotectDocument", fileName).toString()), null, null); | |
DeleteUnprotectDocumentRequest request = new DeleteUnprotectDocumentRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "DeleteUnprotectDocument").toString(), null, null, null, null); | |
ProtectionDataResponse result = WordsAPIInitialize.wordsApi.deleteUnprotectDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetBorder.docx"; | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetBorder", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetBorder", fileName).toString()), | |
null, null); | |
GetBorderRequest request = new GetBorderRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetBorder").toString(), null, null, | |
null); | |
BorderResponse result = WordsAPIInitialize.wordsApi.getBorder(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetBorders.docx"; | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetBorders", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetBorders", fileName).toString()), | |
null, null); | |
GetBordersRequest request = new GetBordersRequest(remoteName, sourcePath, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetBorders").toString(), null, null, | |
null); | |
BordersResponse result = WordsAPIInitialize.wordsApi.getBorders(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetComment.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetComments", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetCommentRequest request = new GetCommentRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetComments").toString(), null, null, null); | |
CommentResponse result = WordsAPIInitialize.wordsApi.getComment(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentProtection.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocuemntProtection", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentProtectionRequest request = new GetDocumentProtectionRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocuemntProtection").toString(), null, null, null); | |
ProtectionDataResponse result = WordsAPIInitialize.wordsApi.getDocumentProtection(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentBookmarkByName.docx"; | |
String bookmarkName = "aspose"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumemtBookmarkByName", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentBookmarkByNameRequest request = new GetDocumentBookmarkByNameRequest(remoteName, bookmarkName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumemtBookmarkByName").toString(), null, null, null); | |
BookmarkResponse result = WordsAPIInitialize.wordsApi.getDocumentBookmarkByName(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentBookmarks.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentBookmarks", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentBookmarksRequest request = new GetDocumentBookmarksRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentBookmarks").toString(), null, null, null); | |
BookmarksResponse result = WordsAPIInitialize.wordsApi.getDocumentBookmarks(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentFieldNames.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentFieldNames", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentFieldNamesRequest request = new GetDocumentFieldNamesRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentFieldNames").toString(), null, null, null, null); | |
FieldNamesResponse result = WordsAPIInitialize.wordsApi.getDocumentFieldNames(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestGetDocumentHyperlinks.doc"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentHyperlinks", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentHyperlinksRequest request = new GetDocumentHyperlinksRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentHyperlinks").toString(), null, null, null); | |
HyperlinksResponse result = WordsAPIInitialize.wordsApi.getDocumentHyperlinks(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentParagraph.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraph", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphRequest request = new GetDocumentParagraphRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraph").toString(), null, null, | |
null, null); | |
ParagraphResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraph(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "GetDocumentParagraphFormat.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphFormat", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphFormatRequest request = new GetDocumentParagraphFormatRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphFormat").toString(), null, null, | |
null, null); | |
ParagraphFormatResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraphFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentParagraphRun.doc"; | |
Integer index = 0; | |
String paragraphPath = "paragraphs/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphRun", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphRunRequest request = new GetDocumentParagraphRunRequest(remoteName, paragraphPath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphRun").toString(), null, null, | |
null); | |
RunResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraphRun(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentParagraphRunFont.doc"; | |
Integer index = 0; | |
String paragraphPath = "paragraphs/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphRunFont", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphRunFontRequest request = new GetDocumentParagraphRunFontRequest(remoteName, paragraphPath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphRunFont").toString(), null, null, | |
null); | |
FontResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraphRunFont(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentParagraphRuns.doc"; | |
String paragraphPath = "sections/0/paragraphs/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphsRun", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphRunsRequest request = new GetDocumentParagraphRunsRequest(remoteName, paragraphPath, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentParagraphsRun").toString(), null, null, | |
null); | |
RunsResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraphRuns(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentProperties.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentProperties", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentPropertiesRequest request = new GetDocumentPropertiesRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentProperties").toString(), null, null, null); | |
DocumentPropertiesResponse result = WordsAPIInitialize.wordsApi.getDocumentProperties(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentProperty.docx"; | |
String propName = "Author"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentProperty", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentPropertyRequest request = new GetDocumentPropertyRequest(remoteName, propName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentProperty").toString(), | |
null, null, null); | |
DocumentPropertyResponse result = WordsAPIInitialize.wordsApi.getDocumentProperty(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentParagraphRuns.doc"; | |
String paragraphPath = "sections/0"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentsParagraph", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentParagraphsRequest request = new GetDocumentParagraphsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentsParagraph").toString(), null, null, | |
null, paragraphPath); | |
ParagraphLinkCollectionResponse result = WordsAPIInitialize.wordsApi.getDocumentParagraphs(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentStatistics.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentStastitics", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentStatisticsRequest request = new GetDocumentStatisticsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentStastitics").toString(), null, null, null, null, null, null); | |
StatDataResponse result = WordsAPIInitialize.wordsApi.getDocumentStatistics(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentTextItems.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentTextItems", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentTextItemsRequest request = new GetDocumentTextItemsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentTextItems").toString(), null, null, | |
null); | |
@SuppressWarnings("deprecation") | |
TextItemsResponse result = WordsAPIInitialize.wordsApi.getDocumentTextItems(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String format = "text"; | |
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentWithFormat.docx"; | |
WordsApi wordsAPI=WordsAPIInitialize.getWordsAPI(); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentWithFormat", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetDocumentWithFormatRequest request = new GetDocumentWithFormatRequest(remoteName, format, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDocumentWithFormat").toString(), null, null, null, null, null); | |
File result = WordsAPIInitialize.wordsApi.getDocumentWithFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentDrawingObjectByIndex.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectByIndex", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentDrawingObjectByIndexRequest request = new GetDocumentDrawingObjectByIndexRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectByIndex").toString(), | |
null, null, null, "sections/0"); | |
DrawingObjectResponse result = WordsAPIInitialize.wordsApi.getDocumentDrawingObjectByIndex(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentDrawingObjects.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObject", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentDrawingObjectsRequest request = new GetDocumentDrawingObjectsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObject").toString(), | |
null, null, null, "sections/0"); | |
DrawingObjectsResponse result = WordsAPIInitialize.wordsApi.getDocumentDrawingObjects(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetDocumentDrawingObjectImageData.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectImageData", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentDrawingObjectImageDataRequest request = new GetDocumentDrawingObjectImageDataRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectImageData").toString(), | |
null, null, null, "sections/0"); | |
File result = WordsAPIInitialize.wordsApi.getDocumentDrawingObjectImageData(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "sample_EmbeddedOLE.docx"; | |
String remoteName = "TestGetDocumentDrawingObjectOleData.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectOLEData", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetDrawingObjectOLEData", fileName).toString()), | |
null, null); | |
GetDocumentDrawingObjectOleDataRequest request = new GetDocumentDrawingObjectOleDataRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetDrawingObjectOLEData").toString(), | |
null, null, null, "sections/0"); | |
File result = WordsAPIInitialize.wordsApi.getDocumentDrawingObjectOleData(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx"; | |
String remoteName = "TestGetFields.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetField", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetField", fileName).toString()), | |
null, null); | |
GetFieldsRequest request = new GetFieldsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetField").toString(), | |
null, null, null, "sections/0"); | |
FieldsResponse result = WordsAPIInitialize.wordsApi.getFields(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx"; | |
String remoteName = "TestGetFields.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFields", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetFields", fileName).toString()), | |
null, null); | |
GetFieldsRequest request = new GetFieldsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFields").toString(), | |
null, null, null, "sections/0"); | |
FieldsResponse result = WordsAPIInitialize.wordsApi.getFields(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "Footnote.doc"; | |
String remoteName = "TestGetFootnote.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFootnote", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetFootnote", fileName).toString()), | |
null, null); | |
GetFootnoteRequest request = new GetFootnoteRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFootnote").toString(), | |
null, null, null, null); | |
FootnoteResponse result = WordsAPIInitialize.wordsApi.getFootnote(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "Footnote.doc"; | |
String remoteName = "TestGetFootnote.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFootnotes", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetFootnotes", fileName).toString()), | |
null, null); | |
GetFootnoteRequest request = new GetFootnoteRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFootnotes").toString(), | |
null, null, null, null); | |
FootnoteResponse result = WordsAPIInitialize.wordsApi.getFootnote(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "FormFilled.docx"; | |
String remoteName = "TestGetFormField.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFormField", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetFormField", fileName).toString()), | |
null, null); | |
GetFormFieldRequest request = new GetFormFieldRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFormField").toString(), null, null, | |
null, "sections/0"); | |
FormFieldResponse result = WordsAPIInitialize.wordsApi.getFormField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "FormFilled.docx"; | |
String remoteName = "TestGetFormFields.docx"; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFormFields", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "GetFormFields", fileName).toString()), | |
null, null); | |
GetFormFieldsRequest request = new GetFormFieldsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetFormFields").toString(), null, null, | |
null, "sections/0"); | |
FormFieldsResponse result = WordsAPIInitialize.wordsApi.getFormFields(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestGetDocumentHyperlinkByIndex.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, "GetHyperlinkByIndex", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetDocumentHyperlinkByIndexRequest request = new GetDocumentHyperlinkByIndexRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, | |
null); | |
HyperlinkResponse result = WordsAPIInitialize.wordsApi.getDocumentHyperlinkByIndex(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "MathObjects.docx"; | |
String remoteName = "TestGetOfficeMathObject.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), | |
null, null); | |
GetOfficeMathObjectRequest request = new GetOfficeMathObjectRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, | |
null, null); | |
OfficeMathObjectResponse result = WordsAPIInitialize.wordsApi.getOfficeMathObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "MathObjects.docx"; | |
String remoteName = "TestGetOfficeMathObjects.doc"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName) | |
.toString()), | |
null, null); | |
GetOfficeMathObjectsRequest request = new GetOfficeMathObjectsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, | |
null, null); | |
System.out.println(request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetSection.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetSectionRequest request = new GetSectionRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, | |
null); | |
SectionResponse result = WordsAPIInitialize.wordsApi.getSection(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetSectionPageSetup.doc"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), | |
null, null); | |
GetSectionPageSetupRequest request = new GetSectionPageSetupRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, | |
null); | |
SectionPageSetupResponse result = WordsAPIInitialize.wordsApi.getSectionPageSetup(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestGetSections.docx"; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
GetSectionsRequest request = new GetSectionsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
SectionLinkCollectionResponse result = WordsAPIInitialize.wordsApi.getSections(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTableCell.docx"; | |
Integer index = 0; | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTableCellRequest request = new GetTableCellRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
TableCellResponse result = WordsAPIInitialize.wordsApi.getTableCell(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTableCellFormat.docx"; | |
Integer index = 0; | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTableCellFormatRequest request = new GetTableCellFormatRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
TableCellFormatResponse result = WordsAPIInitialize.wordsApi.getTableCellFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTableRow.docx"; | |
Integer index = 0; | |
String sourcePath = "tables/1"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTableRowRequest request = new GetTableRowRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
TableRowResponse result = WordsAPIInitialize.wordsApi.getTableRow(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTableProperties.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTablePropertiesRequest request = new GetTablePropertiesRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null); | |
TablePropertiesResponse result = WordsAPIInitialize.wordsApi.getTableProperties(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTableRowFormat.docx"; | |
Integer index = 0; | |
String sourcePath = "sections/0/tables/2"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTableRowFormatRequest request = new GetTableRowFormatRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
TableRowFormatResponse result = WordsAPIInitialize.wordsApi.getTableRowFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestGetTable.docx"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
GetTableRequest request = new GetTableRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null); | |
TableResponse result = WordsAPIInitialize.wordsApi.getTable(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestInsertTableCell.docx"; | |
TableCellInsert body = new TableCellInsert(); | |
String sourcePath = "sections/0/tables/2/rows/0"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
InsertTableCellRequest request = new InsertTableCellRequest(remoteName, sourcePath, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body); | |
TableCellResponse result = WordsAPIInitialize.wordsApi.insertTableCell(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestInsertTableRow.docx"; | |
TableRowInsert body = new TableRowInsert().columnsCount(5); | |
String sourcePath = "sections/0/tables/2"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
InsertTableRowRequest request = new InsertTableRowRequest(remoteName, sourcePath, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body); | |
TableRowResponse result = WordsAPIInitialize.wordsApi.insertTableRow(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestInsertTable.docx"; | |
TableInsert body = new TableInsert().columnsCount(3).rowsCount(5); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
InsertTableRequest request = new InsertTableRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body, null); | |
TableResponse result = WordsAPIInitialize.wordsApi.insertTable(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are the gists for Aspose.Words for Cloud 18.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SaveOptionsData saveOptionsData = new SaveOptionsData().colorMode("1").saveFormat("doc").fileName("google.doc") | |
.dmlRenderingMode("1").dmlEffectsRenderingMode("1").zipOutput(false).updateLastSavedTimeProperty(false); | |
LoadWebDocumentData body = new LoadWebDocumentData().loadingDocumentUrl("http://google.com") | |
.saveOptions(saveOptionsData); | |
PostLoadWebDocumentRequest request = new PostLoadWebDocumentRequest(body, null); | |
SaveResponse result = WordsAPIInitialize.wordsApi.postLoadWebDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostComment.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"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostCommentRequest request = new PostCommentRequest(remoteName, index, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null); | |
CommentResponse result = WordsAPIInitialize.wordsApi.postComment(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "SampleMailMergeTemplate.docx"; | |
String remoteName = "TestPostDocumentExecuteMailMerge.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostDocumentExecuteMailMerge", remoteName).toString() | |
.replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "PostDocumentExecuteMailMerge", fileName) | |
.toString()), | |
null, null); | |
String data = new String(Files.readAllBytes(Paths.get(WordsAPIInitialize.LocalTestFolder, | |
"PostDocumentExecuteMailMerge", "SampleMailMergeTemplateData.txt")), "utf8"); | |
PostDocumentExecuteMailMergeRequest request = new PostDocumentExecuteMailMergeRequest(remoteName, data, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostDocumentExecuteMailMerge").toString(), null, null, | |
null, null, null, null, null, destName); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postDocumentExecuteMailMerge(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "PostDocumentParagraphFormat.doc"; | |
ParagraphFormat body = new ParagraphFormat().alignment(ParagraphFormat.AlignmentEnum.RIGHT); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostDocumentParagraphFormatRequest request = new PostDocumentParagraphFormatRequest(remoteName, body, "", 0, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null); | |
ParagraphFormatResponse result = WordsAPIInitialize.wordsApi.postDocumentParagraphFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostDocumentParagraphRunFont.doc"; | |
Integer index = 0; | |
String paragraphPath = "paragraphs/0"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
Font body = new Font().bold(true); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostDocumentParagraphRunFontRequest request = new PostDocumentParagraphRunFontRequest(remoteName, body, paragraphPath, | |
index, Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null); | |
FontResponse result = WordsAPIInitialize.wordsApi.postDocumentParagraphRunFont(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostDocumentSaveAs.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
SaveOptionsData saveOptionsData = new SaveOptionsData().saveFormat("pdf").fileName(destName); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostDocumentSaveAs", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostDocumentSaveAsRequest request = new PostDocumentSaveAsRequest(remoteName, saveOptionsData, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostDocumentSaveAs").toString(), null, null, null, null, null); | |
SaveResponse result = WordsAPIInitialize.wordsApi.postDocumentSaveAs(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostDrawingObject.docx"; | |
File data = Paths.get(WordsAPIInitialize.LocalCommonFolder, "aspose-cloud.png").toFile(); | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostDrawingObjectRequest request = new PostDrawingObjectRequest(remoteName, "{\"Left\": 0}", data, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, null); | |
DrawingObjectResponse result = WordsAPIInitialize.wordsApi.postDrawingObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TestExecuteTemplate.doc"; | |
String remoteName = "TestPostExecuteTemplate.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostExecuteTemplate", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, "PostExecuteTemplate", fileName).toString()), null, null); | |
String data = new String(Files.readAllBytes( | |
Paths.get(WordsAPIInitialize.LocalTestFolder, "PostExecuteTemplate", "TestExecuteTemplateData.txt")), "utf8"); | |
PostExecuteTemplateRequest request = new PostExecuteTemplateRequest(remoteName, data, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostExecuteTemplate").toString(), null, null, null, null, null, null, | |
destName); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postExecuteTemplate(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx"; | |
String remoteName = "TestPostField.docx"; | |
Integer index = 0; | |
Field body = (Field) new Field().fieldCode("{ NUMPAGES }").nodeId("0.0.3"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PostFieldRequest request = new PostFieldRequest(remoteName, body, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, "sections/0/paragraphs/0"); | |
FieldResponse result = WordsAPIInitialize.wordsApi.postField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "Footnote.doc"; | |
String remoteName = "TestPostFootnote.docx"; | |
Integer index = 0; | |
Footnote body = new Footnote().text("new text is here"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PostFootnoteRequest request = new PostFootnoteRequest(remoteName, body, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, null); | |
FootnoteResponse result = WordsAPIInitialize.wordsApi.postFootnote(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "FormFilled.docx"; | |
String remoteName = "TestPostFormField.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
Integer index = 0; | |
FormField body = new FormFieldTextInput().textInputFormat("").textInputDefault("123").name("FullName").enabled(true) | |
.calculateOnExit(true).statusText(""); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PostFormFieldRequest request = new PostFormFieldRequest(remoteName, body, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null, null); | |
FormFieldResponse result = WordsAPIInitialize.wordsApi.postFormField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostInsertPageNumbers.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
PageNumber body = new PageNumber().format("{PAGE} of { NUMPAGES }").alignment("center").isTop(false); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostInsertPageNumbersRequest request = new PostInsertPageNumbersRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postInsertPageNumbers(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostInsertDocumentWatermarkImage.docx"; | |
Double rotationAngle = 0.0; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
File image = Paths.get(WordsAPIInitialize.LocalCommonFolder, "aspose-cloud.png").toFile(); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostInsertDocumentWatermarkImageRequest request = new PostInsertDocumentWatermarkImageRequest(remoteName, image, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null, rotationAngle, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postInsertDocumentWatermarkImage(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostInsertDocumentWatermarkText.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
WatermarkText body = new WatermarkText().rotationAngle(90.0).text("This is the text"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostInsertDocumentWatermarkTextRequest request = new PostInsertDocumentWatermarkTextRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postInsertDocumentWatermarkText(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostReplaceText.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
ReplaceTextRequest body = new ReplaceTextRequest().oldValue("aspose").newValue("aspose new"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostReplaceTextRequest request = new PostReplaceTextRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null); | |
ReplaceTextResponse result = WordsAPIInitialize.wordsApi.postReplaceText(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostSplitDocument.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
String format = "text"; | |
Integer from = 1; | |
Integer to = 2; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostSplitDocument", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostSplitDocumentRequest request = new PostSplitDocumentRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PostSplitDocument").toString(), null, null, null, destName, format, | |
from, to, null, null); | |
SplitDocumentResponse result = WordsAPIInitialize.wordsApi.postSplitDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostUpdateDocumentFields.docx"; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostUpdateDocumentFieldsRequest request = new PostUpdateDocumentFieldsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null); | |
DocumentResponse result = WordsAPIInitialize.wordsApi.postUpdateDocumentFields(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPostUpdateDocumentBookmark.docx"; | |
String bookmarkName = "aspose"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
BookmarkData body = new BookmarkData().name(bookmarkName).text("This will be the text for Aspose"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PostUpdateDocumentBookmarkRequest request = new PostUpdateDocumentBookmarkRequest(remoteName, body, bookmarkName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null); | |
BookmarkResponse result = WordsAPIInitialize.wordsApi.postUpdateDocumentBookmark(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutComment.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"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PutCommentRequest request = new PutCommentRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null); | |
CommentResponse result = WordsAPIInitialize.wordsApi.putComment(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String format = "pdf"; | |
String fileName = "test_multi_pages.docx"; | |
PutConvertDocumentRequest request = new PutConvertDocumentRequest( | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), format, null, null, null, | |
null); | |
File result = WordsAPIInitialize.wordsApi.putConvertDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "SampleExecuteTemplate.docx"; | |
File file = Paths.get(WordsAPIInitialize.LocalTestFolder, "PutDocumentFieldNames", fileName).toFile(); | |
PutDocumentFieldNamesRequest request = new PutDocumentFieldNamesRequest(file, true); | |
FieldNamesResponse result = WordsAPIInitialize.wordsApi.putDocumentFieldNames(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutDrawingObject.docx"; | |
File data = Paths.get(WordsAPIInitialize.LocalCommonFolder, "aspose-cloud.png").toFile(); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PutDrawingObjectRequest request = new PutDrawingObjectRequest(remoteName, "{\"Left\": 0}", data, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, null); | |
DrawingObjectResponse result = WordsAPIInitialize.wordsApi.putDrawingObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "SampleMailMergeTemplate.docx"; | |
File file = Paths.get(WordsAPIInitialize.LocalTestFolder, "PutExecuteMailMergeOnline", fileName).toFile(); | |
File data = Paths | |
.get(WordsAPIInitialize.LocalTestFolder, "PutExecuteMailMergeOnline", "SampleMailMergeTemplateData.txt") | |
.toFile(); | |
PutExecuteMailMergeOnlineRequest request = new PutExecuteMailMergeOnlineRequest(file, data, null, null, null); | |
File result = WordsAPIInitialize.wordsApi.putExecuteMailMergeOnline(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "SampleExecuteTemplate.docx"; | |
File file = Paths.get(WordsAPIInitialize.LocalTestFolder, "PutExecuteTemplateOnline", fileName).toFile(); | |
File data = Paths | |
.get(WordsAPIInitialize.LocalTestFolder, "PutExecuteTemplateOnline", "SampleExecuteTemplateData.txt") | |
.toFile(); | |
PutExecuteTemplateOnlineRequest request = new PutExecuteTemplateOnlineRequest(file, data, null, null, null, | |
null); | |
File result = WordsAPIInitialize.wordsApi.putExecuteTemplateOnline(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "GetField.docx"; | |
String remoteName = "TestPutField.docx"; | |
Field body = (Field) new Field().fieldCode("{ NUMPAGES }").nodeId("0.0.3"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PutFieldRequest request = new PutFieldRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, "sections/0/paragraphs/0", null); | |
FieldResponse result = WordsAPIInitialize.wordsApi.putField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "Footnote.doc"; | |
String remoteName = "TestPutFootnote.docx"; | |
Footnote body = new Footnote().text("new text is here").footnoteType(Footnote.FootnoteTypeEnum.ENDNOTE); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PutFootnoteRequest request = new PutFootnoteRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, null); | |
FootnoteResponse result = WordsAPIInitialize.wordsApi.putFootnote(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "FormFilled.docx"; | |
String remoteName = "TestPutFormField.docx"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
FormField body = new FormFieldTextInput().textInputFormat("UPPERCASE").textInputDefault("123").name("FullName") | |
.enabled(true).calculateOnExit(true).statusText(""); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
PutFormFieldRequest request = new PutFormFieldRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null, "sections/0", null); | |
FormFieldResponse result = WordsAPIInitialize.wordsApi.putFormField(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutParagraph.doc"; | |
String paragraphPath = "sections/0"; | |
String destName = Paths.get(WordsAPIInitialize.RemoteTestOut, remoteName).toString(); | |
ParagraphInsert body = new ParagraphInsert().text("This is a new paragraph for your document"); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PutParagraphRequest request = new PutParagraphRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
destName, null, null, paragraphPath, null); | |
ParagraphResponse result = WordsAPIInitialize.wordsApi.putParagraph(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestPutProtectDocument.docx"; | |
ProtectionRequest body = new ProtectionRequest().newPassword("123"); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PutProtectDocument", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
PutProtectDocumentRequest request = new PutProtectDocumentRequest(remoteName, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "PutProtectDocument").toString(), null, null, null, null); | |
ProtectionDataResponse result = WordsAPIInitialize.wordsApi.putProtectDocument(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_doc.docx"; | |
String remoteName = "TestRejectAllRevisions.docx"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "RejectAllRevisions", remoteName).toString().replace("\\", "/"), | |
new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
RejectAllRevisionsRequest request = new RejectAllRevisionsRequest(remoteName, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, "RejectAllRevisions").toString(), null, null, null, null); | |
RevisionsModificationResponse result = WordsAPIInitialize.wordsApi.rejectAllRevisions(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestRenderDrawingObject.docx"; | |
String format = "png"; | |
Integer index = 0; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
RenderDrawingObjectRequest request = new RenderDrawingObjectRequest(remoteName, format, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, | |
"sections/0", null); | |
File result = WordsAPIInitialize.wordsApi.r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "MathObjects.docx"; | |
String remoteName = "TestRenderMathObject.doc"; | |
Integer index = 0; | |
String format = "png"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
RenderMathObjectRequest request = new RenderMathObjectRequest(remoteName, format, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null); | |
File result = WordsAPIInitialize.wordsApi.renderMathObject(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestRenderParagraph.doc"; | |
Integer index = 0; | |
String format = "png"; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
RenderParagraphRequest request = new RenderParagraphRequest(remoteName, format, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null); | |
File result = WordsAPIInitialize.wordsApi.renderParagraph(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestRenderTable.docx"; | |
Integer index = 0; | |
String format = "png"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
RenderTableRequest request = new RenderTableRequest(remoteName, format, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null); | |
File result = WordsAPIInitialize.wordsApi.renderTable(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestSearch.docx"; | |
String pattern = "aspose"; | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
SearchRequest request = new SearchRequest(remoteName, pattern, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null); | |
SearchResponse result = WordsAPIInitialize.wordsApi.search(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestUpdateBorder.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); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
UpdateBorderRequest request = new UpdateBorderRequest(remoteName, body, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null); | |
BorderResponse result = WordsAPIInitialize.wordsApi.updateBorder(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "test_multi_pages.docx"; | |
String remoteName = "TestUpdateSectionPageSetup.doc"; | |
Integer index = 0; | |
PageSetup body = new PageSetup().rtlGutter(true).leftMargin(10.0).orientation(PageSetup.OrientationEnum.LANDSCAPE) | |
.paperSize(PageSetup.PaperSizeEnum.A5); | |
WordsAPIInitialize.wordsApi | |
.putCreate(Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString() | |
.replace("\\", "/"), new File(Paths.get(WordsAPIInitialize.LocalCommonFolder, fileName).toString()), null, null); | |
UpdateSectionPageSetupRequest request = new UpdateSectionPageSetupRequest(remoteName, index, body, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null); | |
SectionPageSetupResponse result = WordsAPIInitialize.wordsApi.updateSectionPageSetup(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestUpdateTableCellFormat.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; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
UpdateTableCellFormatRequest request = new UpdateTableCellFormatRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body); | |
TableCellFormatResponse result = WordsAPIInitialize.wordsApi.updateTableCellFormat(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestUpdateTableProperties.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); | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
UpdateTablePropertiesRequest request = new UpdateTablePropertiesRequest(remoteName, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body, null); | |
TablePropertiesResponse result = WordsAPIInitialize.wordsApi.updateTableProperties(request); | |
System.out.println(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = "TablesGet.docx"; | |
String remoteName = "TestUpdateTableRowFormat.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"; | |
WordsAPIInitialize.wordsApi.putCreate( | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName(), remoteName).toString().replace("\\", | |
"/"), | |
new File(Paths.get(WordsAPIInitialize.LocalTestFolder, this.getClass().getSimpleName(), fileName).toString()), null, | |
null); | |
UpdateTableRowFormatRequest request = new UpdateTableRowFormatRequest(remoteName, sourcePath, index, | |
Paths.get(WordsAPIInitialize.RemoteTestFolder, this.getClass().getSimpleName()).toString(), null, null, null, null, | |
null, null, body); | |
TableRowFormatResponse result = WordsAPIInitialize.wordsApi.updateTableRowFormat(request); | |
System.out.println(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment