Last active
June 15, 2020 10:34
-
-
Save aspose-cloud/19215e2ac3d61ca0fd78d1ca2f1c1023 to your computer and use it in GitHub Desktop.
The GIST contains .NET Examples of Aspose.Words Cloud APIs.
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
The GIST contains .NET Examples of Aspose.Words Cloud APIs. |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class AcceptAllRevisions | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
AcceptAllRevisionsRequest request = new AcceptAllRevisionsRequest(fileName, null, Constants.MYStorage, null, null, null); | |
RevisionsModificationResponse result = wordsApi.AcceptAllRevisions(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var image = "aspose-cloud.png"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var putDrawingObjectRequest = new PutDrawingObjectRequest(fileName, "{\"Left\": 0}", File.OpenRead(@"c:\Data\" + image), folder); | |
var actual = wordsApi.PutDrawingObject(putDrawingObjectRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "SampleWordDocument.docx"; | |
Field body = new Field { Result = "3", FieldCode = "{ NUMPAGES }", NodeId = "0.0.3" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var putFieldRequest = new PutFieldRequest(fileName, body, folder, nodePath: "sections/0/paragraphs/0"); | |
var actual = wordsApi.PutField(putFieldRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Footnote.doc"; | |
var footNote = new Footnote { FootnoteType = Footnote.FootnoteTypeEnum.Endnote, Text = "test endnote" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var putFootnoteRequest = new PutFootnoteRequest(fileName, footNote, folder); | |
var actual = wordsApi.PutFootnote(putFootnoteRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "UpdatedDocument.docx"; | |
string folder = null; // File exists at the root of the storage | |
var body = new FormFieldTextInput | |
{ | |
Name = "FullName", | |
Enabled = true, | |
CalculateOnExit = true, | |
StatusText = string.Empty, | |
TextInputType = FormFieldTextInput.TextInputTypeEnum.Regular, | |
TextInputDefault = "123", | |
TextInputFormat = "UPPERCASE" | |
}; | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var putFormFieldRequest = new PutFormFieldRequest(fileName, body, folder, nodePath: "sections/0/paragraphs/0", destFileName: destFileName); | |
var actual = wordsApi.PutFormField(putFormFieldRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var paragraph = new ParagraphInsert { Text = "This is a new paragraph for your document" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var paragraphRequest = new PutParagraphRequest(fileName, paragraph, folder, nodePath: "sections/0"); | |
var actual = wordsApi.PutParagraph(paragraphRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Run.doc"; | |
var run = new Run { Text = "run with text" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var runRequest = new PutRunRequest(fileName, "paragraphs/1", run, folder); | |
var actual = wordsApi.PutRun(runRequest); |
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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
var run = new Run { Text = "Cloud File Format APIs" }; | |
var runRequest = new PutRunRequest(fileName, "sections/0/headersfooters/0/paragraphs/0", run); | |
var actual = wordsApi.PutRun(runRequest); |
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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
var run = new Run { Text = "ASPOSE" }; | |
var runRequest = new PutRunRequest(fileName, "sections/0/headersfooters/1/paragraphs/0", run); | |
var actual = wordsApi.PutRun(runRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class AppendaDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
string documentToAppend = "test_multi_pages.docx"; | |
string folder = ""; // File exists at the root of the storage | |
string destName = "Out_Merged.docx"; // // Changes will be made in the source document | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
// Upload the document to append to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + documentToAppend, FileMode.Open), documentToAppend, Constants.MYStorage)); | |
var body = new DocumentEntryList(); | |
List<DocumentEntry> docEntries = new List<DocumentEntry>(); | |
DocumentEntry docEntry = new DocumentEntry { Href = documentToAppend, ImportFormatMode = "KeepSourceFormatting" }; | |
docEntries.Add(docEntry); | |
body.DocumentEntries = docEntries; | |
AppendDocumentRequest request = new AppendDocumentRequest(fileName, body, folder, Constants.MYStorage, null, null, destName, null, null); | |
DocumentResponse result = wordsApi.AppendDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_doc.docx"; | |
var documentToAppend = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
string destFileName = null; // Changes are made in the source docuemnt | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
// Upload document to append to Cloud Storage | |
request = new PutCreateRequest(documentToAppend, File.OpenRead(@"c:\Data\" + documentToAppend), null, null); | |
storageApi.PutCreate(request); | |
var documentList = new DocumentEntryList(); | |
System.Collections.Generic.List<DocumentEntry> docEntries = new System.Collections.Generic.List<DocumentEntry>(); | |
DocumentEntry docEntry = new DocumentEntry { Href = documentToAppend, ImportFormatMode = "KeepSourceFormatting" }; | |
docEntries.Add(docEntry); | |
documentList.DocumentEntries = docEntries; | |
var postAppendDocumentRequest = new PostAppendDocumentRequest(fileName, documentList, folder, destFileName: destFileName); | |
var actual = wordsApi.PostAppendDocument(postAppendDocumentRequest); |
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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
var runIndex = 0; | |
var fontDto = new Font { Bold = true, Name = "Verdana", Size = 14, Color = new XmlColor { Web = "#000000" } }; | |
// Apply formatting to first page header | |
var documentParagraphRunFontRequest = new PostDocumentParagraphRunFontRequest(fileName, fontDto, "sections/0/headersfooters/1/paragraphs/0", runIndex); | |
var actual = wordsApi.PostDocumentParagraphRunFont(documentParagraphRunFontRequest); | |
// Apply formatting to header of all other pages | |
documentParagraphRunFontRequest = new PostDocumentParagraphRunFontRequest(fileName, fontDto, "sections/0/headersfooters/0/paragraphs/0", runIndex); | |
actual = wordsApi.PostDocumentParagraphRunFont(documentParagraphRunFontRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ApplyStyleToDocumentElement | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestApplyStyleToDocumentElement.docx"; | |
var styledNodePath = "paragraphs/1/paragraphFormat"; | |
var body = new StyleApply(); | |
body.StyleName = "Heading 1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ApplyStyleToDocumentElementRequest request = new ApplyStyleToDocumentElementRequest(fileName, body, styledNodePath, null, Constants.MYStorage); | |
WordsResponse result = wordsApi.ApplyStyleToDocumentElement(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class BuildReport | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ReportTemplate.docx"; | |
var data = File.ReadAllText("..\\..\\..\\Resources\\" + "ReportData.json"); | |
var settings = new ReportEngineSettings | |
{ | |
DataSourceType = ReportEngineSettings.DataSourceTypeEnum.Json, | |
ReportBuildOptions = new List<ReportBuildOptions> | |
{ | |
ReportBuildOptions.AllowMissingMembers, | |
ReportBuildOptions.RemoveEmptyParagraphs, | |
} | |
}; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
BuildReportRequest request = new BuildReportRequest(fileName, data, settings, null, Constants.MYStorage); | |
DocumentResponse result = wordsApi.BuildReport(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class BuildReportOnline | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
var file = File.Open("..\\..\\..\\Resources\\ReportTemplate.docx", FileMode.Open); | |
var data = File.ReadAllText("..\\..\\..\\Resources\\" + "ReportData.json"); | |
var settings = new ReportEngineSettings | |
{ | |
DataSourceType = ReportEngineSettings.DataSourceTypeEnum.Json, | |
DataSourceName = "persons", | |
}; | |
BuildReportOnlineRequest request = new BuildReportOnlineRequest(file, data, settings); | |
var result = wordsApi.BuildReportOnline(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var body = new ProtectionRequest { NewPassword = string.Empty }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentProtectionRequest = new PostChangeDocumentProtectionRequest(fileName, body, folder); | |
var actual = wordsApi.PostChangeDocumentProtection(documentProtectionRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var classifyDocumentRequest = new ClassifyDocumentRequest(fileName, folder, bestClassesCount: "3"); | |
var actual = wordsApi.ClassifyDocument(classifyDocumentRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var request = new ClassifyRequest("Try text classification", "3"); | |
var actual = this.WordsApi.Classify(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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ClassifyTaxonomyDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ClassifyDocumentRequest request = new ClassifyDocumentRequest(fileName, null, Constants.MYStorage, null, null, null, null); | |
ClassificationResponse result = wordsApi.ClassifyDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CompareDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName1 = "compareTestDoc1.doc"; | |
string fileName2 = "compareTestDoc2.doc"; | |
string dest_name = "Out_ComparedTestDocs.doc"; | |
CompareData compareData = new CompareData(); | |
compareData.Author = "author"; | |
compareData.ComparingWithDocument = fileName2; | |
compareData.DateTime = DateTime.Now; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName1, FileMode.Open), fileName1, Constants.MYStorage)); | |
// Upload the document to append to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName2, FileMode.Open), fileName2, Constants.MYStorage)); | |
CompareDocumentRequest request = new CompareDocumentRequest(fileName1, compareData, null, Constants.MYStorage, null, null, dest_name); | |
DocumentResponse result = wordsApi.CompareDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class Constants | |
{ | |
// TODO: Get your AppSID and AppKey at https://dashboard.aspose.cloud (free | |
// registration is required). | |
public static string AppSID = "XXXXX-XXXXX-XXXXX-XXXX"; | |
public static string AppKey = "XXXXXXXXXX"; | |
public static string MYStorage = "First Storage"; | |
} | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
using Aspose.Storage.Cloud.Sdk.Model.Requests; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Storage.Cloud.Sdk.Api; | |
namespace AsposeWordsSDKExamples | |
{ | |
class ConvertHTMLToWord | |
{ | |
protected const string BaseProductUri = @"https://api.aspose.cloud"; | |
protected const string MyAppKey = "xxxx"; | |
protected const string MyAppSid = "xxxx-xxxx-xxxx-xxxx-xxxx"; | |
static void Main(string[] args) | |
{ | |
var configuration = new Configuration { ApiBaseUrl = BaseProductUri, AppKey = MyAppKey, AppSid = MyAppSid, Version = Configuration.AvailiableApiVersions.V1 }; | |
WordsApi WordsApi = new WordsApi(configuration); | |
StorageApi StorageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "html_example.html"; | |
var destFileName = "html_example.docx"; | |
// First upload input file to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Gists\" + fileName), null, null); | |
StorageApi.PutCreate(request); | |
var saveOptionsData = new SaveOptionsData { SaveFormat = "docx", FileName = destFileName }; | |
var saveAsRequest = new PostDocumentSaveAsRequest(fileName, saveOptionsData); | |
var actual = WordsApi.PostDocumentSaveAs(saveAsRequest); | |
} | |
} | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ConvertPDFDocumentToWord | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.pdf"; | |
string format = "docx"; | |
string destName = "Out_test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SaveAsRequest request = new SaveAsRequest(fileName, new SaveOptionsData() { SaveFormat = format, FileName = destName }, null, Constants.MYStorage, null, null, null); | |
SaveResponse result = wordsApi.SaveAs(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ConvertWordDocumentToAnotherFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "pdf"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ConvertDocumentRequest request = new ConvertDocumentRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), format, Constants.MYStorage, null, null, null); | |
Stream result = wordsApi.ConvertDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ConvertWordDocumentToAnotherFormatWithDetailedSettings | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "html"; | |
string destName = "Out_test_multi_pages.html"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SaveAsRequest request = new SaveAsRequest(fileName, new SaveOptionsData() { SaveFormat = format, FileName = destName }, null, Constants.MYStorage, null, null, null); | |
SaveResponse result = wordsApi.SaveAs(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ConvertWordDocumentToTiffWithDetailedSettings | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "tiff"; | |
string destName = "Out_test_multi_pages.tiff"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
TiffSaveOptionsData saveOptionsData = new TiffSaveOptionsData(); | |
saveOptionsData.SaveFormat = format; | |
saveOptionsData.FileName = destName; | |
SaveAsTiffRequest request = new SaveAsTiffRequest(fileName, saveOptionsData, null, Constants.MYStorage, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); | |
SaveResponse result = wordsApi.SaveAsTiff(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CopyFile | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
CopyFileRequest request = new CopyFileRequest("NewFolder\\test_multi_pages.docx", "NewFolder\\test_multi_pages1.docx", Constants.MYStorage, Constants.MYStorage, null); | |
wordsApi.CopyFile(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CopyFolder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
CopyFolderRequest request = new CopyFolderRequest("NewFolder", "NewFolder1", Constants.MYStorage, Constants.MYStorage); | |
wordsApi.CopyFolder(request); | |
Console.WriteLine("Expected response type is Void: 'NewFolder' folder copied as 'NewFolder1'."); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CopyStyle | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestCopyStyle.docx"; | |
var body = new StyleCopy(); | |
body.StyleName = "Heading 1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
CopyStyleRequest request = new CopyStyleRequest(fileName, body, null, Constants.MYStorage); | |
StyleResponse result = wordsApi.CopyStyle(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CreateFolder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
CreateFolderRequest request = new CreateFolderRequest("NewFolder", Constants.MYStorage); | |
wordsApi.CreateFolder(request); | |
Console.WriteLine("Expected response type is Void: 'NewFolder' folder created."); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CreateNewWordDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "NewDocument.docx"; | |
string folder = null; // Document will be created at the root of the storage | |
CreateDocumentRequest request = new CreateDocumentRequest(Constants.MYStorage, fileName, folder); | |
DocumentResponse result = wordsApi.CreateDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class CreateOrUpdateDocumentProperty | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string propertyName = "AsposeAuthor"; | |
DocumentPropertyCreateOrUpdate prop = new DocumentPropertyCreateOrUpdate() { Value = "Rizwan" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
CreateOrUpdateDocumentPropertyRequest request = new CreateOrUpdateDocumentPropertyRequest(fileName, propertyName, prop, null, Constants.MYStorage, null, null, null, null, null); | |
DocumentPropertyResponse result = wordsApi.CreateOrUpdateDocumentProperty(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteAllParagraphTabStops | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphTabStops.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteAllParagraphTabStopsRequest request = new DeleteAllParagraphTabStopsRequest(fileName, "", index, null, Constants.MYStorage); | |
wordsApi.DeleteAllParagraphTabStops(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteBorder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
string sourcePath = "tables/1/rows/0/cells/0/"; | |
string destName = "DeleteBorder.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteBorderRequest request = new DeleteBorderRequest(fileName, sourcePath, "Line", null, Constants.MYStorage, null, null, destName, null, null); | |
BorderResponse result = wordsApi.DeleteBorder(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteBorders | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
string sourcePath = "tables/1/rows/0/cells/0/"; | |
string destName = "DeleteBorders.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteBordersRequest request = new DeleteBordersRequest(fileName, sourcePath, null, Constants.MYStorage, null, null, destName, null, null); | |
BordersResponse result = wordsApi.DeleteBorders(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var tableCellRequest = new DeleteTableCellRequest(fileName, "sections/0/tables/2/rows/0", 0, folder); | |
var actual = wordsApi.DeleteTableCell(tableCellRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteComment | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteCommentRequest request = new DeleteCommentRequest(fileName, index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteComment(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteFieldsRequest = new DeleteFieldsRequest(fileName, folder); | |
var actual = wordsApi.DeleteFields(deleteFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteDocumentMacros | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteMacrosRequest request = new DeleteMacrosRequest(fileName, null, Constants.MYStorage, null, | |
null, null, null, null); | |
wordsApi.DeleteMacros(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteDocumentProperty | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string propertyName = "testProp"; | |
string destName = "Out_DeleteDocumentProperty.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteDocumentPropertyRequest request = new DeleteDocumentPropertyRequest(fileName, propertyName, null, Constants.MYStorage, null, null, destName, null, null); | |
wordsApi.DeleteDocumentProperty(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteDocumentWatermark | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteWatermarkRequest request = new DeleteWatermarkRequest(fileName, null, Constants.MYStorage, null, null, null, null, null); | |
DocumentResponse result = wordsApi.DeleteWatermark(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteDrawingObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteDrawingObjectRequest request = new DeleteDrawingObjectRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteDrawingObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteFieldRequest request = new DeleteFieldRequest(fileName, "sections/0/paragraphs/0", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteFields | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteFieldsRequest request = new DeleteFieldsRequest(fileName, "sections/0", null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteFields(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteFile | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
DeleteFileRequest request = new DeleteFileRequest("NewFolder\\test_multi_pages1.docx", Constants.MYStorage, null); | |
wordsApi.DeleteFile(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteFolder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
DeleteFolderRequest request = new DeleteFolderRequest("NewFolder\\NewFolder1", Constants.MYStorage, true); | |
wordsApi.DeleteFolder(request); | |
Console.WriteLine("Expected response type is Void: 'NewFolder/NewFolder1' folder deleted recusrsively."); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteFootnote | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Footnote.doc"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteFootnoteRequest request = new DeleteFootnoteRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteFootnote(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Footnote.doc"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteFootnoteRequest = new DeleteFootnoteRequest(fileName, index, folder); | |
var actual = wordsApi.DeleteFootnote(deleteFootnoteRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteFormField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "FormFilled.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteFormFieldRequest request = new DeleteFormFieldRequest(fileName, "sections/0", index, null, null, null, null, null, null, null); | |
wordsApi.DeleteFormField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "MathObjects.docx"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteOfficeMathObjectRequest = new DeleteOfficeMathObjectRequest(fileName, index, folder); | |
var actual = wordsApi.DeleteOfficeMathObject(deleteOfficeMathObjectRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteOfficeMathObjec | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "MathObjects.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteOfficeMathObjectRequest request = new DeleteOfficeMathObjectRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteOfficeMathObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteParagraph | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteParagraphRequest request = new DeleteParagraphRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteParagraph(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteFieldsRequest = new DeleteFieldsRequest(fileName, folder, nodePath: "paragraphs/0"); | |
var actual = wordsApi.DeleteFields(deleteFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteParagraphListFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphGetListFormat.doc"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteParagraphListFormatRequest request = new DeleteParagraphListFormatRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteParagraphListFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteParagraphTabStop | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphTabStops.docx"; | |
double position = 72; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteParagraphTabStopRequest request = new DeleteParagraphTabStopRequest(fileName, "", position, index, null, Constants.MYStorage); | |
wordsApi.DeleteParagraphTabStop(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteRun | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Run.doc"; | |
int index = 0; | |
string paragraphPath = "paragraphs/1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteRunRequest request = new DeleteRunRequest(fileName, paragraphPath, index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteRun(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Run.doc"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteRunRequest = new DeleteRunRequest(fileName, "paragraphs/1", index, folder); | |
var actual = wordsApi.DeleteRun(deleteRunRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteFieldsRequest = new DeleteFieldsRequest(fileName, folder, nodePath: "sections/0"); | |
var actual = wordsApi.DeleteFields(deleteFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var deleteFieldsRequest = new DeleteFieldsRequest(fileName, folder, nodePath: "sections/0/paragraphs/0"); | |
var actual = wordsApi.DeleteFields(deleteFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteTable | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteTableRequest request = new DeleteTableRequest(fileName, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteTable(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var borderRequest = new DeleteBorderRequest(fileName, "tables/1/rows/0/cells/0/", 0, folder); | |
var actual = wordsApi.DeleteBorder(borderRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var bordersRequest = new DeleteBordersRequest(fileName, "tables/1/rows/0/cells/0/", folder); | |
var actual = wordsApi.DeleteBorders(bordersRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteTableCell | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteTableCellRequest request = new DeleteTableCellRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteTableCell(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DeleteTableRow | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "tables/1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
DeleteTableRowRequest request = new DeleteTableRowRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null, null, null, null); | |
wordsApi.DeleteTableRow(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class DownloadFile | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
DownloadFileRequest request = new DownloadFileRequest("NewFolder\\test_multi_pages.docx", Constants.MYStorage, null); | |
Stream response = wordsApi.DownloadFile(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var localName = "test_multi_pages.docx"; | |
var remoteName = "Source.docx"; | |
var taxonomy = "documents"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
this.UploadFileToStorage(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName)); | |
var request = new ClassifyDocumentRequest(remoteName, | |
this.dataFolder, | |
bestClassesCount: "3", | |
taxonomy: taxonomy); | |
var actual = this.WordsApi.ClassifyDocument(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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
protected const string BaseProductUri = @"https://api.aspose.cloud"; | |
var configuration = new Configuration { ApiBaseUrl = BaseProductUri + "/v1.1", AppKey = this.keys.AppKey, AppSid = this.keys.AppSid }; | |
this.WordsApi = new WordsApi(configuration); | |
this.StorageApi = new StorageApi(this.keys.AppKey, this.keys.AppSid, BaseProductUri + "/v1.1"); | |
var localName = "SampleMailMergeTemplate.docx"; | |
var remoteName = "TestPostDocumentExecuteMailMerge.docx"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
var destFileName = Path.Combine(BaseTestOutPath, remoteName); | |
var data = File.ReadAllText(BaseTestContext.GetDataDir(this.mailMergeFolder) + "SampleMailMergeTemplateData.txt"); | |
this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.mailMergeFolder) + localName)); | |
var request = new PostDocumentExecuteMailMergeRequest(remoteName, false, data, this.dataFolder, destFileName: destFileName); | |
var actual = this.WordsApi.PostDocumentExecuteMailMerge(request); | |
Assert.AreEqual(200, actual.Code); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var localName = "45.pdf"; | |
var remoteName = "TestPostDocumentSaveAsFromPdfToDoc.pdf"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
var destFileName = Path.Combine(BaseTestOutPath, Path.GetFileNameWithoutExtension(remoteName) + ".docx"); | |
var saveOptionsData = new SaveOptionsData { SaveFormat = "docx", FileName = destFileName }; | |
this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.convertFolder) + localName)); | |
var request = new PostDocumentSaveAsRequest(remoteName, saveOptionsData, this.dataFolder); | |
var actual = this.WordsApi.PostDocumentSaveAs(request); | |
Assert.AreEqual(200, actual.Code); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var localName = "test_multi_pages.docx"; | |
var remoteName = "TestPostDocumentSaveAs.docx"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
var destFileName = Path.Combine(BaseTestOutPath, Path.GetFileNameWithoutExtension(remoteName) + ".pdf"); | |
var saveOptionsData = new SaveOptionsData { SaveFormat = "pdf", FileName = destFileName }; | |
this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName)); | |
var request = new PostDocumentSaveAsRequest(remoteName, saveOptionsData, this.dataFolder); | |
var actual = this.WordsApi.PostDocumentSaveAs(request); | |
Assert.AreEqual(200, actual.Code); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
protected const string BaseProductUri = @"https://api.aspose.cloud"; | |
var configuration = new Configuration { ApiBaseUrl = BaseProductUri + "/v1.1", AppKey = this.keys.AppKey, AppSid = this.keys.AppSid }; | |
this.WordsApi = new WordsApi(configuration); | |
this.StorageApi = new StorageApi(this.keys.AppKey, this.keys.AppSid, BaseProductUri + "/v1.1"); | |
var localName = "TestExecuteTemplate.doc"; | |
var remoteName = "TestPostExecuteTemplate.docx"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
var destFileName = Path.Combine(BaseTestOutPath, remoteName); | |
var data = File.ReadAllText(BaseTestContext.GetDataDir(this.mailMergeFolder) + "TestExecuteTemplateData.txt"); | |
this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.mailMergeFolder) + localName)); | |
var request = new PostExecuteTemplateRequest(remoteName, data, this.dataFolder, destFileName: destFileName); | |
var actual = this.WordsApi.PostExecuteTemplate(request); | |
Assert.AreEqual(200, actual.Code); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var format = "pdf"; | |
using (var fileStream = File.OpenRead(BaseTestContext.GetDataDir(this.convertFolder) + "test_uploadfile.docx")) | |
{ | |
var request = new PutConvertDocumentRequest(fileStream, format); | |
var result = this.WordsApi.PutConvertDocument(request); | |
Assert.IsTrue(result.Length > 0, "Error occurred while converting document"); | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
var localName = "test_multi_pages.docx"; | |
var remoteName = "TestPutDocumentSaveAsTiff.docx"; | |
var fullName = Path.Combine(this.dataFolder, remoteName); | |
var destFileName = Path.Combine(BaseTestOutPath, Path.GetFileNameWithoutExtension(remoteName) + ".tiff"); | |
var body = new TiffSaveOptionsData { FileName = "abc.tiff", SaveFormat = "tiff" }; | |
this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName)); | |
var request = new PutDocumentSaveAsTiffRequest(remoteName, | |
body, | |
this.dataFolder, | |
destFileName: destFileName); | |
var actual = this.WordsApi.PutDocumentSaveAsTiff(request); | |
Assert.AreEqual(200, actual.Code); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
protected const string BaseProductUri = @"https://api.aspose.cloud"; | |
var configuration = new Configuration { ApiBaseUrl = BaseProductUri + "/v1.1", AppKey = this.keys.AppKey, AppSid = this.keys.AppSid }; | |
this.WordsApi = new WordsApi(configuration); | |
this.StorageApi = new StorageApi(this.keys.AppKey, this.keys.AppSid, BaseProductUri + "/v1.1"); | |
using (var file = File.OpenRead(BaseTestContext.GetDataDir(this.mailMergeFolder) + "SampleExecuteTemplate.docx")) | |
{ | |
using (var data = File.OpenRead(BaseTestContext.GetDataDir(this.mailMergeFolder) + "SampleExecuteTemplateData.txt")) | |
{ | |
var request = new PutExecuteMailMergeOnlineRequest(file, data); | |
var result = this.WordsApi.PutExecuteMailMergeOnline(request); | |
Assert.IsTrue(result.Length > 0, "Error occurred while executing mail merge"); | |
} | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
protected const string BaseProductUri = @"https://api.aspose.cloud"; | |
var configuration = new Configuration { ApiBaseUrl = BaseProductUri + "/v1.1", AppKey = this.keys.AppKey, AppSid = this.keys.AppSid }; | |
this.WordsApi = new WordsApi(configuration); | |
this.StorageApi = new StorageApi(this.keys.AppKey, this.keys.AppSid, BaseProductUri + "/v1.1"); | |
using (var file = File.OpenRead(BaseTestContext.GetDataDir(this.mailMergeFolder) + "SampleMailMergeTemplate.docx")) | |
{ | |
using (var data = File.OpenRead(BaseTestContext.GetDataDir(this.mailMergeFolder) + "SampleExecuteTemplateData.txt")) | |
{ | |
var request = new PutExecuteTemplateOnlineRequest(file, data); | |
var result = this.WordsApi.PutExecuteTemplateOnline(request); | |
Assert.IsTrue(result.Length > 0, "Error occurred while executing template"); | |
} | |
} |
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
# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-php/ | |
$localName = "test_multi_pages.docx"; | |
$remoteName = "Source.docx"; | |
$subfolder = "Common"; | |
$taxonomy = "documents"; | |
$fullName = self::$baseTestPath . $subfolder . "/" . $remoteName; | |
$file = realpath(__DIR__ . '/../../../..') . '/TestData/Common/' . $localName; | |
$putRequest = new Aspose\Storage\Model\Requests\PutCreateRequest($fullName, $file); | |
$this->storage->PutCreate($putRequest); | |
$request = new Requests\ClassifyDocumentRequest($remoteName, $folder=self::$baseTestPath . $subfolder); | |
$request->set_taxonomy($taxonomy); | |
$result = $this->words->classifyDocument($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
# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-php/ | |
$this->storage = new StorageApi(); | |
$this->config = new Configuration(); | |
$this->words = new WordsApi(null, $this->config); | |
$localName = "SampleMailMergeTemplate.docx"; | |
$remoteName = "TestPostDocumentExecuteMailMerge.docx"; | |
$subfolder = "DocumentActions/MailMerge"; | |
$fullName = self::$baseTestPath . $subfolder . "/" . $remoteName; | |
$destName = self::$baseTestOut . $remoteName; | |
$data = file_get_contents(realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "SampleMailMergeTemplateData.txt"); | |
$file = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . $localName; | |
$this->storage->PutCreate($Path=$fullName, $versionId = null, $storage = null, $file); | |
$request = new Requests\PostDocumentExecuteMailMergeRequest($remoteName, false, $data, $folder=self::$baseTestPath . $subfolder, | |
null, null, null, null, | |
null, null, $destName); | |
$result = $this->words->postDocumentExecuteMailMerge($request); | |
Assert::assertEquals(200, json_decode($result, true)["Code"]); |
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
# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-php/ | |
$this->storage = new StorageApi(); | |
$this->config = new Configuration(); | |
$this->words = new WordsApi(null, $this->config); | |
$localName = "TestExecuteTemplate.doc"; | |
$remoteName = "TestPostExecuteTemplate.docx"; | |
$subfolder = "DocumentActions/MailMerge"; | |
$fullName = self::$baseTestPath . $subfolder . "/" . $remoteName; | |
$destName = self::$baseTestOut . $remoteName; | |
$data = file_get_contents(realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "TestExecuteTemplateData.txt"); | |
$file = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . $localName; | |
$this->storage->PutCreate($Path=$fullName, $versionId = null, $storage = null, $file); | |
$request = new Requests\PostExecuteTemplateRequest($remoteName, $data, $folder=self::$baseTestPath . $subfolder, | |
null, null, null, null, | |
null, null, $destName); | |
$result = $this->words->postExecuteTemplate($request); | |
Assert::assertEquals(200, json_decode($result, true)["Code"]); |
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
# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-php/ | |
$this->storage = new StorageApi(); | |
$this->config = new Configuration(); | |
$this->words = new WordsApi(null, $this->config); | |
$file = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "SampleMailMergeTemplate.docx"; | |
$data = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "SampleMailMergeTemplateData.txt"; | |
$request = new Requests\PutExecuteMailMergeOnlineRequest($file, $data); | |
$result = $this->words->putExecuteMailMergeOnline($request); | |
Assert::assertNotNull($result, "Error occurred while executing mail merge"); |
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
# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-php/ | |
$this->storage = new StorageApi(); | |
$this->config = new Configuration(); | |
$this->words = new WordsApi(null, $this->config); | |
$file = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "SampleExecuteTemplate.docx"; | |
$data = realpath(__DIR__ . '/../../../..') . '/TestData/MailMerge/' . "SampleExecuteTemplateData.txt"; | |
$request = new Requests\PutExecuteTemplateOnlineRequest($file, $data); | |
$result = $this->words->putExecuteTemplateOnline($request); | |
Assert::assertNotNull($result, "Error occurred while executing template"); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetAvailableFonts | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
GetAvailableFontsRequest request = new GetAvailableFontsRequest(null); | |
AvailableFontsResponse result = wordsApi.GetAvailableFonts(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetBorder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetBorderRequest request = new GetBorderRequest(fileName, sourcePath, "Line", null, Constants.MYStorage, null, null); | |
BorderResponse result = wordsApi.GetBorder(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetBorders | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetBordersRequest request = new GetBordersRequest(fileName, sourcePath, null, Constants.MYStorage, null, null); | |
BordersResponse result = wordsApi.GetBorders(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetComment | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetCommentRequest request = new GetCommentRequest(fileName, index, null, Constants.MYStorage, null, null); | |
CommentResponse result = wordsApi.GetComment(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetComments | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetCommentsRequest request = new GetCommentsRequest(fileName, null, Constants.MYStorage, null, null); | |
CommentsResponse result = wordsApi.GetComments(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getDocumentRequest = new GetDocumentRequest(fileName, folder); | |
var actual = wordsApi.GetDocument(getDocumentRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentBookmarkByName | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string bookmarkName = "aspose"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetBookmarkByNameRequest request = new GetBookmarkByNameRequest(fileName, bookmarkName, null, Constants.MYStorage, null, null); | |
BookmarkResponse result = wordsApi.GetBookmarkByName(request); | |
} | |
catch ( | |
Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentBookmarks | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetBookmarksRequest request = new GetBookmarksRequest(fileName, null, Constants.MYStorage, null, null); | |
BookmarksResponse result = wordsApi.GetBookmarks(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentDrawingObjectByIndex | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentDrawingObjectByIndexRequest request = new GetDocumentDrawingObjectByIndexRequest(fileName, "sections/0", index, null, Constants.MYStorage, null, null); | |
DrawingObjectResponse result = wordsApi.GetDocumentDrawingObjectByIndex(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var objectIndex = 0; | |
var format = "png"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var renderDrawingObjectRequest = new RenderDrawingObjectRequest(fileName, format, objectIndex, folder, nodePath: "sections/0"); | |
var result = wordsApi.RenderDrawingObject(renderDrawingObjectRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentDrawingObjectImageData | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentDrawingObjectImageDataRequest request = new GetDocumentDrawingObjectImageDataRequest(fileName, "sections/0", index, null, Constants.MYStorage, null, null); | |
Stream result = wordsApi.GetDocumentDrawingObjectImageData(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var objectIndex = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentDrawingObjectByIndexRequest = new GetDocumentDrawingObjectByIndexRequest(fileName, objectIndex, folder, nodePath: "sections/0"); | |
DrawingObjectResponse actual = wordsApi.GetDocumentDrawingObjectByIndex(documentDrawingObjectByIndexRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentDrawingObjectOleData | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "sample_EmbeddedOLE.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentDrawingObjectOleDataRequest request = new GetDocumentDrawingObjectOleDataRequest(fileName, "sections/0", index, null, Constants.MYStorage, null, null); | |
Stream result = wordsApi.GetDocumentDrawingObjectOleData(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentDrawingObjects | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentDrawingObjectsRequest request = new GetDocumentDrawingObjectsRequest(fileName, "sections/0", null, Constants.MYStorage, null, null); | |
DrawingObjectsResponse result = wordsApi.GetDocumentDrawingObjects(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentDrawingObjectsRequest = new GetDocumentDrawingObjectsRequest(fileName, folder, nodePath: "sections/0"); | |
var actual = wordsApi.GetDocumentDrawingObjects(documentDrawingObjectsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentFieldNames | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentFieldNamesRequest request = new GetDocumentFieldNamesRequest(fileName, null, Constants.MYStorage, null, null, null); | |
FieldNamesResponse result = wordsApi.GetDocumentFieldNames(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TestGetDocumentFormatUsingStorage.docx"; | |
var format = "text"; | |
var storage = "AWSStorageS3"; | |
string folder = null; // File exists at the root of the storage | |
var request = new GetDocumentWithFormatRequest(fileName, format, folder, storage); | |
var result = wordsApi.GetDocumentWithFormat(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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentHyperlinkByIndex | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentHyperlinkByIndexRequest request = new GetDocumentHyperlinkByIndexRequest(fileName, index, null, Constants.MYStorage, null, null); | |
HyperlinkResponse result = wordsApi.GetDocumentHyperlinkByIndex(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentHyperlinks | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentHyperlinksRequest request = new GetDocumentHyperlinksRequest(fileName, null, Constants.MYStorage, null, null); | |
HyperlinksResponse result = wordsApi.GetDocumentHyperlinks(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentInfo | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentRequest request = new GetDocumentRequest(fileName, null, Constants.MYStorage, null, null); | |
DocumentResponse result = wordsApi.GetDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraph | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphRequest request = new GetParagraphRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
ParagraphResponse result = wordsApi.GetParagraph(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphRequest = new GetDocumentParagraphRequest(fileName, index, folder, nodePath: "sections/0"); | |
var actual = wordsApi.GetDocumentParagraph(documentParagraphRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraphFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphFormatRequest request = new GetParagraphFormatRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
ParagraphFormatResponse result = wordsApi.GetParagraphFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraphRun | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
string paragraphPath = "paragraphs/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetRunRequest request = new GetRunRequest(fileName, paragraphPath, index, null, Constants.MYStorage, null, null); | |
RunResponse result = wordsApi.GetRun(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraphRunFont | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
string paragraphPath = "paragraphs/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetRunFontRequest request = new GetRunFontRequest(fileName, paragraphPath, index, null, Constants.MYStorage, null, null); | |
FontResponse result = wordsApi.GetRunFont(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraphRuns | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string paragraphPath = "sections/0/paragraphs/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetRunsRequest request = new GetRunsRequest(fileName, paragraphPath, null, Constants.MYStorage, null, null); | |
RunsResponse result = wordsApi.GetRuns(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentParagraphs | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string paragraphPath = "sections/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphsRequest request = new GetParagraphsRequest(fileName, paragraphPath, null, Constants.MYStorage, null, null); | |
ParagraphLinkCollectionResponse result = wordsApi.GetParagraphs(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphRequest = new GetDocumentParagraphRequest(fileName, index, folder); | |
var actual = wordsApi.GetDocumentParagraph(documentParagraphRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentProperties | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentPropertiesRequest request = new GetDocumentPropertiesRequest(fileName, null, Constants.MYStorage, null, null); | |
DocumentPropertiesResponse result = wordsApi.GetDocumentProperties(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentProperty | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string propName = "Author"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentPropertyRequest request = new GetDocumentPropertyRequest(fileName, propName, null, Constants.MYStorage, null, null); | |
DocumentPropertyResponse result = wordsApi.GetDocumentProperty(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string propertyName = "Author"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getDocumentPropertyRequest = new GetDocumentPropertyRequest(fileName, propertyName, folder); | |
var actual = wordsApi.GetDocumentProperty(getDocumentPropertyRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentProtection | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentProtectionRequest request = new GetDocumentProtectionRequest(fileName, null, Constants.MYStorage, null, null); | |
ProtectionDataResponse result = wordsApi.GetDocumentProtection(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getDocumentProtectionRequest = new GetDocumentProtectionRequest(fileName, folder); | |
var actual = wordsApi.GetDocumentProtection(getDocumentProtectionRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetDocumentStatistics | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentStatisticsRequest request = new GetDocumentStatisticsRequest(fileName, null, null, null, null, | |
null, null, null); | |
StatDataResponse result = wordsApi.GetDocumentStatistics(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentTextItemsRequest = new GetDocumentTextItemsRequest(fileName, folder); | |
var actual = wordsApi.GetDocumentTextItems(documentTextItemsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var format = "text"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getDocumentWithFormatRequest = new GetDocumentWithFormatRequest(fileName, format, folder); | |
var result = wordsApi.GetDocumentWithFormat(getDocumentWithFormatRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var format = "text"; | |
var destFileName = "test_multi_pages.text"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getDocumentWithFormatRequest = new GetDocumentWithFormatRequest(fileName, format, folder, outPath: destFileName); | |
wordsApi.GetDocumentWithFormat(getDocumentWithFormatRequest); | |
var result = storageApi.GetIsExist(new GetIsExistRequest(destFileName)); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFieldRequest request = new GetFieldRequest(fileName, "sections/0", index, null, null, null, null); | |
FieldResponse result = wordsApi.GetField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "GetField.docx"; | |
var fieldIndex = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getFieldRequest = new GetFieldRequest(fileName, fieldIndex, folder, nodePath: "sections/0/paragraphs/0"); | |
var actual = wordsApi.GetField(getFieldRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFields | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFieldsRequest request = new GetFieldsRequest(fileName, "sections/0", null, Constants.MYStorage, null, null); | |
FieldsResponse result = wordsApi.GetFields(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "GetField.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getFieldsRequest = new GetFieldsRequest(fileName, folder, nodePath: "sections/0"); | |
FieldsResponse actual = wordsApi.GetFields(getFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFilesList | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
GetFilesListRequest request = new GetFilesListRequest("NewFolder\\NewFolder1", Constants.MYStorage); | |
FilesList response = wordsApi.GetFilesList(request); | |
Console.WriteLine("Expected response type is FilesList."); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFootnote | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Footnote.doc"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFootnoteRequest request = new GetFootnoteRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
FootnoteResponse result = wordsApi.GetFootnote(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Footnote.doc"; | |
var index = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getFootnoteRequest = new GetFootnoteRequest(fileName, index, folder); | |
var actual = wordsApi.GetFootnote(getFootnoteRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFootnotes | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Footnote.doc"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFootnotesRequest request = new GetFootnotesRequest(fileName, "", null, Constants.MYStorage, null, null); | |
FootnotesResponse result = wordsApi.GetFootnotes(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFormField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "FormFilled.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFormFieldRequest request = new GetFormFieldRequest(fileName, "sections/0", index, null, Constants.MYStorage, null, null); | |
FormFieldResponse result = wordsApi.GetFormField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetFormFields | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "FormFilled.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetFormFieldsRequest request = new GetFormFieldsRequest(fileName, "sections/0", null, Constants.MYStorage, null, null); | |
FormFieldsResponse result = wordsApi.GetFormFields(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetList | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ListsGet.doc"; | |
int listId = 1; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetListRequest request = new GetListRequest(fileName, listId, null, Constants.MYStorage); | |
ListResponse result = wordsApi.GetList(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetLists | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ListsGet.doc"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetListsRequest request = new GetListsRequest(fileName, null, Constants.MYStorage); | |
ListsResponse result = wordsApi.GetLists(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetOfficeMathObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "MathObjects.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetOfficeMathObjectRequest request = new GetOfficeMathObjectRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
OfficeMathObjectResponse result = wordsApi.GetOfficeMathObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetOfficeMathObjects | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "MathObjects.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetOfficeMathObjectsRequest request = new GetOfficeMathObjectsRequest(fileName, "", null, Constants.MYStorage, null, null); | |
OfficeMathObjectsResponse result = wordsApi.GetOfficeMathObjects(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphFormatRequest = new GetDocumentParagraphFormatRequest(fileName, 0, folder); | |
var actual = wordsApi.GetDocumentParagraphFormat(documentParagraphFormatRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetParagraphListFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphGetListFormat.doc"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphListFormatRequest request = new GetParagraphListFormatRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
ParagraphListFormatResponse result = wordsApi.GetParagraphListFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetParagraphListFormatWithoutNodePath | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphGetListFormat.doc"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphListFormatWithoutNodePathRequest request = new GetParagraphListFormatWithoutNodePathRequest(fileName, index, null, Constants.MYStorage, null, null); | |
ParagraphListFormatResponse result = wordsApi.GetParagraphListFormatWithoutNodePath(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "GetField.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphRunsRequest = new GetDocumentParagraphRunsRequest(fileName, "sections/0/paragraphs/0", folder); | |
RunsResponse actual = wordsApi.GetDocumentParagraphRuns(documentParagraphRunsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetParagraphsText | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "RangeGet.doc"; | |
string rangeStart = "id0.0.0"; | |
string rangeEnd = "id0.0.1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetRangeTextRequest request = new GetRangeTextRequest(fileName, rangeStart, rangeEnd, null, Constants.MYStorage, null, null); | |
RangeTextResponse result = wordsApi.GetRangeText(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetParagraphTabStops | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphTabStops.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetParagraphTabStopsRequest request = new GetParagraphTabStopsRequest(fileName, "", index, null, Constants.MYStorage); | |
TabStopsResponse result = wordsApi.GetParagraphTabStops(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetSection | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetSectionRequest request = new GetSectionRequest(fileName, index, null, Constants.MYStorage, null, null); | |
SectionResponse result = wordsApi.GetSection(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetSectionPage | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetSectionPageSetupRequest request = new GetSectionPageSetupRequest(fileName, index, null, Constants.MYStorage, null, null); | |
SectionPageSetupResponse result = wordsApi.GetSectionPageSetup(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var sectionIndex = 0; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var getSectionPageSetupRequest = new GetSectionPageSetupRequest(fileName, sectionIndex, folder); | |
var actual = wordsApi.GetSectionPageSetup(getSectionPageSetupRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetSections | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetSectionsRequest request = new GetSectionsRequest(fileName, null, Constants.MYStorage, null, null); | |
SectionLinkCollectionResponse result = wordsApi.GetSections(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetStyleFromDocumentElement | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestGetStyleFromDocumentElement.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetStyleFromDocumentElementRequest request = new GetStyleFromDocumentElementRequest(fileName, "paragraphs/1/paragraphFormat", null, Constants.MYStorage); | |
StyleResponse result = wordsApi.GetStyleFromDocumentElement(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetStyles | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestGetStyles.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetStylesRequest request = new GetStylesRequest(fileName, null, Constants.MYStorage); | |
StylesResponse result = wordsApi.GetStyles(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTable | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTableRequest request = new GetTableRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
TableResponse result = wordsApi.GetTable(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var borderRequest = new GetBorderRequest(fileName, "tables/1/rows/0/cells/0/", 0, folder); | |
var actual = wordsApi.GetBorder(borderRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var bordersRequest = new GetBordersRequest(fileName, "tables/1/rows/0/cells/0/", folder); | |
var actual = wordsApi.GetBorders(bordersRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTableCell | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTableCellRequest request = new GetTableCellRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null); | |
TableCellResponse result = wordsApi.GetTableCell(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTableCellFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTableCellFormatRequest request = new GetTableCellFormatRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null); | |
TableCellFormatResponse result = wordsApi.GetTableCellFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTableProperties | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTablePropertiesRequest request = new GetTablePropertiesRequest(fileName, "", index, null, Constants.MYStorage, null, null); | |
TablePropertiesResponse result = wordsApi.GetTableProperties(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTableRow | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "tables/1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTableRowRequest request = new GetTableRowRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null); | |
TableRowResponse result = wordsApi.GetTableRow(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTableRowFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string sourcePath = "tables/1"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTableRowRequest request = new GetTableRowRequest(fileName, sourcePath, index, null, Constants.MYStorage, null, null); | |
TableRowResponse result = wordsApi.GetTableRow(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class GetTables | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetTablesRequest request = new GetTablesRequest(fileName, "", null, Constants.MYStorage, null, null); | |
TableLinkCollectionResponse result = wordsApi.GetTables(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
// Insert Header for all other pages | |
var putHeaderFooterRequest = new PutHeaderFooterRequest(fileName, "HeaderPrimary", folder); | |
var actual = wordsApi.PutHeaderFooter(putHeaderFooterRequest); |
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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
string fileName = "Sample-Document.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Insert Header for the first page | |
var putHeaderFooterRequest = new PutHeaderFooterRequest(fileName, "HeaderFirst", folder); | |
var actual = wordsApi.PutHeaderFooter(putHeaderFooterRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TestMailMergeWithImages.doc"; | |
var destFileName = "TestMailMergeWithImages_Out.docx"; | |
var data = File.ReadAllText(WordsExamples.PathToDataFiles + @"\DocumentActions\MailMerge\" + "MailMergeData.txt"); | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(WordsExamples.PathToDataFiles + @"\DocumentActions\MailMerge\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var executeMailMergeRequest = new PostDocumentExecuteMailMergeRequest(fileName, data, folder, destFileName: destFileName, withRegions: false); | |
var actual = wordsApi.PostDocumentExecuteMailMerge(executeMailMergeRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertImagesDuringMailMerge | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestMailMergeWithImages.doc"; | |
string destName = "Out_TestMailMergeWithImages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
string data = File.ReadAllText("..\\..\\..\\Resources\\MailMergeData.txt", System.Text.Encoding.UTF8); | |
ExecuteMailMergeRequest request = new ExecuteMailMergeRequest(fileName, data, null, Constants.MYStorage, null, null, null, null, null, null, destName); | |
DocumentResponse result = wordsApi.ExecuteMailMerge(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertList | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestInsertList.doc"; | |
var body = new ListInsert(); | |
body.Template = ListInsert.TemplateEnum.OutlineLegal; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertListRequest request = new InsertListRequest(fileName, body, null, Constants.MYStorage); | |
ListResponse result = wordsApi.InsertList(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertOrUpdateParagraphTabStop | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphTabStops.docx"; | |
int index = 0; | |
var body = new TabStopInsert | |
{ | |
Alignment = TabStopBase.AlignmentEnum.Left, | |
Leader = TabStopBase.LeaderEnum.None, | |
Position = 72, | |
}; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertOrUpdateParagraphTabStopRequest request = new InsertOrUpdateParagraphTabStopRequest(fileName, "", body, index, null, Constants.MYStorage); | |
TabStopsResponse result = wordsApi.InsertOrUpdateParagraphTabStop(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "UpdatedDocument.docx"; | |
var body = new PageNumber { Alignment = "center", Format = "{PAGE} of {NUMPAGES}" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var insertPageNumbersRequest = new PostInsertPageNumbersRequest(fileName, body, folder, destFileName: destFileName); | |
var actual = wordsApi.PostInsertPageNumbers(insertPageNumbersRequest); |
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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
var body = new PageNumber { Alignment = "right", Format = "{PAGE} of {NUMPAGES}", IsTop = true, SetPageNumberOnFirstPage = true }; | |
var insertPageNumbersRequest = new PostInsertPageNumbersRequest(fileName, body); | |
var actual = wordsApi.PostInsertPageNumbers(insertPageNumbersRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertStyle | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestInsertStyle.docx"; | |
var body = new StyleInsert(); | |
body.StyleName = "My Style"; | |
body.StyleType = StyleInsert.StyleTypeEnum.Paragraph; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertStyleRequest request = new InsertStyleRequest(fileName, body, null, Constants.MYStorage); | |
StyleResponse result = wordsApi.InsertStyle(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertTable | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
TableInsert body = new TableInsert() { ColumnsCount = 3, RowsCount = 5 }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertTableRequest request = new InsertTableRequest(fileName, body, "", null, Constants.MYStorage, null, null, null, null, null); | |
TableResponse result = wordsApi.InsertTable(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertTableCell | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
TableCellInsert body = new TableCellInsert(); | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertTableCellRequest request = new InsertTableCellRequest(fileName, body, sourcePath, null, Constants.MYStorage, null, null, null, null, null); | |
TableCellResponse result = wordsApi.InsertTableCell(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class InsertTableRow | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
TableRowInsert body = new TableRowInsert() { ColumnsCount = 5 }; | |
string sourcePath = "sections/0/tables/2"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertTableRowRequest request = new InsertTableRowRequest(fileName, body, sourcePath, null, Constants.MYStorage, null, null, null, null, null); | |
TableRowResponse result = wordsApi.InsertTableRow(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "InsertDocumentWatermarkImage.docx"; | |
double rotationAngle = 0F; | |
var image = "aspose-cloud.png"; | |
string folder = null; // File exists at the root of the storage | |
using (var file = File.OpenRead(@"c:\Data\" + image)) | |
{ | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var insertDocumentWatermarkImageRequest = new PostInsertDocumentWatermarkImageRequest(fileName, file, | |
folder, rotationAngle: rotationAngle, destFileName: destFileName); | |
var actual = wordsApi.PostInsertDocumentWatermarkImage(insertDocumentWatermarkImageRequest); | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "InsertWatermarkImage.docx"; | |
double rotationAngle = 0F; | |
var localImage = "aspose-cloud.png"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
// Upload image to Cloud Storage | |
request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + localImage), null, null); | |
storageApi.PutCreate(request); | |
var insertDocumentWatermarkImageRequest = new PostInsertDocumentWatermarkImageRequest(fileName, folder: folder, image: localImage, rotationAngle: rotationAngle, destFileName: destFileName); | |
var actual = wordsApi.PostInsertDocumentWatermarkImage(insertDocumentWatermarkImageRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "PostInsertWatermarkText.docx"; | |
var body = new WatermarkText { Text = "This is the text", RotationAngle = 90.0f }; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var insertDocumentWatermarkTextRequest = new PostInsertDocumentWatermarkTextRequest(fileName, body, folder, destFileName: destFileName); | |
var actual = wordsApi.PostInsertDocumentWatermarkText(insertDocumentWatermarkTextRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var body = new LoadWebDocumentData(); | |
var saveOptions = new SaveOptionsData | |
{ | |
FileName = "google.doc", | |
SaveFormat = "doc", | |
ColorMode = "1", | |
DmlEffectsRenderingMode = "1", | |
DmlRenderingMode = "1", | |
UpdateSdtContent = false, | |
ZipOutput = false | |
}; | |
body.LoadingDocumentUrl = "http://google.com"; | |
body.SaveOptions = saveOptions; | |
var request = new PostLoadWebDocumentRequest(body); | |
var actual = wordsApi.PostLoadWebDocument(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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "VendorTemplate.doc"; | |
var destFileName = "VendorTemplate_Out.docx"; | |
string folder = null; // File exists at the root of the storage | |
var data = File.ReadAllText(@"c:\Data\" + "Vendors.xml"); | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postExecuteTemplateRequest = new PostExecuteTemplateRequest(fileName, data, folder, destFileName: destFileName); | |
var actual = wordsApi.PostExecuteTemplate(postExecuteTemplateRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Invoice_Template.doc"; | |
var destFileName = "Invoice_Template_out_.doc"; | |
var data = File.ReadAllText(@"c:\Data\" + "CustomerData.xml"); | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var executeMailMergeRequest = new PostDocumentExecuteMailMergeRequest(fileName, data, folder, destFileName: destFileName, withRegions: true); | |
var actual = wordsApi.PostDocumentExecuteMailMerge(executeMailMergeRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class MoveFile | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
MoveFileRequest request = new MoveFileRequest("NewFolder\\test_multi_pages.docx", "NewFolder\\test_multi_pages1.docx", Constants.MYStorage, Constants.MYStorage, null); | |
wordsApi.MoveFile(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class MoveFolder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
MoveFolderRequest request = new MoveFolderRequest("NewFolder1", "NewFolder\\NewFolder1", Constants.MYStorage, Constants.MYStorage); | |
wordsApi.MoveFolder(request); | |
Console.WriteLine("Expected response type is Void: 'NewFolder1' folder moved to 'NewFolder/NewFolder1'."); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PopulateMailMergeTemplateWithHTMLData | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "template.doc"; | |
string destName = "Out_PostDocumentExecuteMailMergeWithHTMLData.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
string data = File.ReadAllText("..\\..\\..\\Resources\\TestPostDocumentExecuteMailMerge.txt", System.Text.Encoding.UTF8); | |
ExecuteMailMergeRequest request = new ExecuteMailMergeRequest(fileName, data, null, Constants.MYStorage, null, null, null, null, null, null, destName); | |
DocumentResponse result = wordsApi.ExecuteMailMerge(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "SampleDocTemplate_Input.docx"; | |
var destFileName = "TestPostExecuteTemplate.docx"; | |
string folder = null; // File exists at the root of the storage | |
var htmlDataFile = "TestExecuteTemplateData.txt"; | |
var data = File.ReadAllText(WordsExamples.PathToDataFiles + @"\DocumentActions\MailMerge\" + htmlDataFile); | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(WordsExamples.PathToDataFiles + @"\DocumentActions\MailMerge\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postExecuteTemplateRequest = new PostExecuteTemplateRequest(fileName, data, folder, destFileName: destFileName); | |
var actual = wordsApi.PostExecuteTemplate(postExecuteTemplateRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostComment | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
NodeLink link = new NodeLink() { NodeId = "0.0.3" }; | |
DocumentPosition documentPosition = new DocumentPosition() { Node = link, Offset = 0 }; | |
CommentUpdate body = new CommentUpdate() { Initial = "YE", RangeStart = documentPosition, RangeEnd = documentPosition, Author = "Rizwan Khan", Text = "A new comment" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateCommentRequest request = new UpdateCommentRequest(fileName, index, body, null, Constants.MYStorage, null, null, null, null, null); | |
CommentResponse result = wordsApi.UpdateComment(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostDocumentExecuteMailMerge | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "SampleMailMergeTemplate.docx"; | |
string destName = "Out_SampleMailMergeTemplate.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
string data = File.ReadAllText("..\\..\\..\\Resources\\SampleMailMergeTemplateData.txt", System.Text.Encoding.UTF8); | |
ExecuteMailMergeRequest request = new ExecuteMailMergeRequest(fileName, data, null, Constants.MYStorage, null, null, null, null, null, null, destName); | |
DocumentResponse result = wordsApi.ExecuteMailMerge(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostDocumentParagraphFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
ParagraphFormat body = new ParagraphFormat() { Alignment = ParagraphFormat.AlignmentEnum.Right }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateParagraphFormatRequest request = new UpdateParagraphFormatRequest(fileName, body, "", 0, null, Constants.MYStorage, null, null, null, null, null); | |
ParagraphFormatResponse result = wordsApi.UpdateParagraphFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostDocumentParagraphRunFont | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
string paragraphPath = "paragraphs/0"; | |
string destName = "postDocumentParagraphRunFont.docx"; | |
Font body = new Font() { Bold = true }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateRunFontRequest request = new UpdateRunFontRequest(fileName, body, paragraphPath, index, null, Constants.MYStorage, null, null, destName, null, null); | |
FontResponse result = wordsApi.UpdateRunFont(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostDrawingObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
Stream data = File.Open("..\\..\\..\\Resources\\aspose-cloud.png", FileMode.Open); | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateDrawingObjectRequest request = new UpdateDrawingObjectRequest(fileName, "{\"Left\": 0}", data, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
DrawingObjectResponse result = wordsApi.UpdateDrawingObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TestExecuteTemplate.doc"; | |
var destFileName = "PostExecuteTemplate.docx"; | |
string folder = null; // File exists at the root of the storage | |
var data = File.ReadAllText(@"c:\Data\" + "TestExecuteTemplateData.txt"); | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postExecuteTemplateRequest = new PostExecuteTemplateRequest(fileName, data, folder, destFileName: destFileName); | |
var actual = wordsApi.PostExecuteTemplate(postExecuteTemplateRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
int index = 0; | |
FieldUpdate body = new FieldUpdate() { FieldCode = "{ NUMPAGES }", LocaleId = "0.0.3" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateFieldRequest request = new UpdateFieldRequest(fileName, body, "sections/0/paragraphs/0", index, null, Constants.MYStorage, null, null, null, null, null); | |
FieldResponse result = wordsApi.UpdateField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostFootnote | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Footnote.doc"; | |
int index = 0; | |
FootnoteUpdate body = new FootnoteUpdate() { Text = "new text is here" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateFootnoteRequest request = new UpdateFootnoteRequest(fileName, body, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
FootnoteResponse result = wordsApi.UpdateFootnote(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostFormField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "FormFilled.docx"; | |
string destName = "PostFormField.docx"; | |
int index = 0; | |
FormFieldTextInput body = new FormFieldTextInput(); | |
body.TextInputFormat = ""; | |
body.TextInputDefault = "123"; | |
body.Name = "FullName"; | |
body.Enabled = true; | |
body.CalculateOnExit = true; | |
body.StatusText = ""; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateFormFieldRequest request = new UpdateFormFieldRequest(fileName, body, "", index, null, Constants.MYStorage, null, destName, null, null, null); | |
FormFieldResponse result = wordsApi.UpdateFormField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostInsertDocumentWatermarkImage | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
Double rotationAngle = 0.0; | |
string destName = "InsertDocumentWatermarkImage.docx"; | |
Stream image = File.Open("..\\..\\..\\Resources\\aspose-cloud.png", FileMode.Open); | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertWatermarkImageRequest request = new InsertWatermarkImageRequest(fileName, image, null, Constants.MYStorage, null, null, destName, null, null, rotationAngle, null); | |
DocumentResponse result = wordsApi.InsertWatermarkImage(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostInsertDocumentWatermarkText | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string destName = "InsertDocumentWatermarkText.docx"; | |
WatermarkText body = new WatermarkText() { RotationAngle = 90.0, Text = "This is the text" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertWatermarkTextRequest request = new InsertWatermarkTextRequest(fileName, body, null, Constants.MYStorage, null, null, destName, null, null); | |
DocumentResponse result = wordsApi.InsertWatermarkText(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostInsertPageNumbers | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string destName = "PostInsertPageNumbers.docx"; | |
PageNumber body = new PageNumber() { Format = "{PAGE} of { NUMPAGES }", Alignment = "center", IsTop = false }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertPageNumbersRequest request = new InsertPageNumbersRequest(fileName, body, null, | |
Constants.MYStorage, null, null, destName, null, null); | |
DocumentResponse result = wordsApi.InsertPageNumbers(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostLoadWebDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
SaveOptionsData saveOptionsData = new SaveOptionsData(); | |
saveOptionsData.DmlRenderingMode = "1"; | |
saveOptionsData.SaveFormat = "doc"; | |
saveOptionsData.FileName = "Out_Google.doc"; | |
saveOptionsData.DmlRenderingMode = "1"; | |
saveOptionsData.DmlEffectsRenderingMode = "1"; | |
saveOptionsData.ZipOutput = false; | |
saveOptionsData.UpdateLastSavedTimeProperty = false; | |
LoadWebDocumentData body = new LoadWebDocumentData() { LoadingDocumentUrl = "https://www.google.com/", SaveOptions = saveOptionsData }; | |
LoadWebDocumentRequest request = new LoadWebDocumentRequest(body, Constants.MYStorage); | |
SaveResponse result = wordsApi.LoadWebDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostReplaceText | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string destName = "PostReplaceText.docx"; | |
ReplaceTextParameters body = new ReplaceTextParameters() { OldValue = "aspose", NewValue = "aspose new" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ReplaceTextRequest request = new ReplaceTextRequest(fileName, body, null, Constants.MYStorage, null, null, destName, null, null); | |
ReplaceTextResponse result = wordsApi.ReplaceText(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostRun | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Run.doc"; | |
int index = 0; | |
string paragraphPath = "paragraphs/1"; | |
RunUpdate body = new RunUpdate() { Text = "Run with text" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateRunRequest request = new UpdateRunRequest(fileName, body, paragraphPath, index, null, Constants.MYStorage, null, null, null, null, null); | |
RunResponse result = wordsApi.UpdateRun(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostUpdateDocumentBookmark | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string bookmarkName = "aspose"; | |
string destName = "PostUpdateDocumentBookmark.docx"; | |
BookmarkData body = new BookmarkData() { Name = bookmarkName, Text = "This will be the text for Aspose" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateBookmarkRequest request = new UpdateBookmarkRequest(fileName, body, bookmarkName, null, Constants.MYStorage, null, null, destName, null, null); | |
BookmarkResponse result = wordsApi.UpdateBookmark(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PostUpdateDocumentFields | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateFieldsRequest request = new UpdateFieldsRequest(fileName, null, Constants.MYStorage, null, null, null); | |
DocumentResponse result = wordsApi.UpdateFields(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "protected_document.docx"; | |
var body = new ProtectionRequest { NewPassword = "123" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var putProtectDocumentRequest = new PutProtectDocumentRequest(fileName, body, folder, destFileName: destFileName); | |
var actual = wordsApi.PutProtectDocument(putProtectDocumentRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutComment | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
NodeLink link = new NodeLink() { NodeId = "0.0.3" }; | |
DocumentPosition documentPosition = new DocumentPosition() { Node = link, Offset = 0 }; | |
CommentInsert body = new CommentInsert() { Initial = "YE", RangeStart = documentPosition, RangeEnd = documentPosition, Author = "Rizwan Niazi", Text = "A new comment" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertCommentRequest request = new InsertCommentRequest(fileName, body, null, Constants.MYStorage, null, null, null, null, null); | |
CommentResponse result = wordsApi.InsertComment(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "NewDocument.docx"; | |
string folder = null; // File exists at the root of the storage | |
var request = new PutCreateDocumentRequest { FileName = fileName, Folder = folder }; | |
var actual = 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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutDocumentFieldNames | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
GetDocumentFieldNamesRequest request = new GetDocumentFieldNamesRequest(fileName, null, Constants.MYStorage, null, null, null); | |
FieldNamesResponse result = wordsApi.GetDocumentFieldNames(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutDrawingObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
Stream data = File.Open("..\\..\\..\\Resources\\aspose-cloud.png", FileMode.Open); | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertDrawingObjectRequest request = new InsertDrawingObjectRequest(fileName, "{\"Left\": 0}", data, "", null, Constants.MYStorage, null, null, null, null, null); | |
DrawingObjectResponse result = wordsApi.InsertDrawingObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutExecuteMailMergeOnline | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "SampleMailMergeTemplate.docx"; | |
Stream file = File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open); | |
Stream fdata = File.Open("..\\..\\..\\Resources\\SampleMailMergeTemplateData.txt", FileMode.Open); | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ExecuteMailMergeOnlineRequest request = new ExecuteMailMergeOnlineRequest(file, fdata, null, null, null); | |
Stream result = wordsApi.ExecuteMailMergeOnline(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var file = File.OpenRead(@"c:\Data\" + "SampleMailMergeTemplate.docx"); | |
var data = File.OpenRead(@"c:\Data\" + "SampleExecuteTemplateData.txt"); | |
var request = new PutExecuteTemplateOnlineRequest(file, data); | |
var result = wordsApi.PutExecuteTemplateOnline(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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "GetField.docx"; | |
FieldInsert body = new FieldInsert() { FieldCode = "{ NUMPAGES }", LocaleId = "0.0.3" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertFieldRequest request = new InsertFieldRequest(fileName, body, "sections/0/paragraphs/0", null, Constants.MYStorage, null, null, null, null, null, null); | |
FieldResponse result = wordsApi.InsertField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutFootnote | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Footnote.doc"; | |
FootnoteInsert body = new FootnoteInsert() { Text = "new text is here", FootnoteType = FootnoteBase.FootnoteTypeEnum.Endnote }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertFootnoteRequest request = new InsertFootnoteRequest(fileName, body, "", null, Constants.MYStorage, null, null, null, null, null); | |
FootnoteResponse result = wordsApi.InsertFootnote(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutFormField | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "FormFilled.docx"; | |
string destName = "PutFormField.docx"; | |
FormFieldTextInput body = new FormFieldTextInput(); | |
body.TextInputFormat = "UPPERCASE"; | |
body.TextInputDefault = "123"; | |
body.Name = "FullName"; | |
body.Enabled = true; | |
body.CalculateOnExit = true; | |
body.StatusText = ""; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertFormFieldRequest request = new InsertFormFieldRequest(fileName, body, "sections/0", null, Constants.MYStorage, null, destName, null, null, null, null); | |
FormFieldResponse result = wordsApi.InsertFormField(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutParagraph | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string paragraphPath = "sections/0"; | |
string destName = "putParagraph.docx"; | |
ParagraphInsert body = new ParagraphInsert() { Text = "This is a new paragraph for your document" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertParagraphRequest request = new InsertParagraphRequest(fileName, body, paragraphPath, null, Constants.MYStorage, null, destName, null, null, null, null); | |
ParagraphResponse result = wordsApi.InsertParagraph(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutProtectDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
ProtectionRequest body = new ProtectionRequest() { NewPassword = "123" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
ProtectDocumentRequest request = new ProtectDocumentRequest(fileName, body, null, Constants.MYStorage, null, null, null); | |
ProtectionDataResponse result = wordsApi.ProtectDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class PutRun | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "Run.doc"; | |
string paragraphPath = "paragraphs/1"; | |
RunInsert body = new RunInsert() { Text = "Run with text" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
InsertRunRequest request = new InsertRunRequest(fileName, paragraphPath, body, null, Constants.MYStorage, null, null, null, null, null, null); | |
RunResponse result = wordsApi.InsertRun(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RawTextClassification | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
ClassifyRequest request = new ClassifyRequest("Try text classification", "3"); | |
ClassificationResponse result = wordsApi.Classify(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RejectAllRevisions | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_doc.docx"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RejectAllRevisionsRequest request = new RejectAllRevisionsRequest(fileName, null, Constants.MYStorage, null, null, null); | |
RevisionsModificationResponse result = wordsApi.RejectAllRevisions(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_doc.docx"; | |
string folder = null; // File exists at the root of the storage | |
var index = 0; | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphFormatRequest = new DeleteParagraphRequest(fileName, index, folder, null); | |
var actual = wordsApi.DeleteParagraph(documentParagraphFormatRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RenderDrawingObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "png"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RenderDrawingObjectRequest request = new RenderDrawingObjectRequest(fileName, format, "sections/0", index, null, Constants.MYStorage, null, null, null); | |
Stream result = wordsApi.RenderDrawingObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var index = 0; | |
var format = "pdf"; | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var renderDrawingObjectRequest = new RenderDrawingObjectRequest(fileName, format, index, nodePath: "sections/0"); | |
var actual = wordsApi.RenderDrawingObject(renderDrawingObjectRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RenderMathObject | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "MathObjects.docx"; | |
int index = 0; | |
string format = "png"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RenderMathObjectRequest request = new RenderMathObjectRequest(fileName, format, "sections/0", index, null, Constants.MYStorage, null, null, null); | |
Stream result = wordsApi.RenderMathObject(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RenderPage | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int pageNumber = 1; | |
string format = "png"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RenderPageRequest request = new RenderPageRequest(fileName, pageNumber, format, null, Constants.MYStorage, null, | |
null, null); | |
Stream result = wordsApi.RenderPage(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RenderParagraph | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
string format = "png"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RenderParagraphRequest request = new RenderParagraphRequest(fileName, format, null, index, null, Constants.MYStorage, null, null, null); | |
Stream result = wordsApi.RenderParagraph(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "SampleWordDocument.docx"; | |
var pageNumber = 1; | |
var format = "bmp"; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var renderPageRequest = new RenderPageRequest(fileName, pageNumber, format, folder); | |
var result = wordsApi.RenderPage(renderPageRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class RenderTable | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
string format = "png"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
RenderTableRequest request = new RenderTableRequest(fileName, format, "sections/0", index, null, Constants.MYStorage, null, | |
null, null); | |
Stream result = wordsApi.RenderTable(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var destFileName = "TestPostReplaceText.docx"; | |
string folder = null; // File exists at the root of the storage | |
var body = new ReplaceTextRequest { OldValue = "aspose", NewValue = "aspose new" }; | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var replaceTextRequest = new PostReplaceTextRequest(fileName, body, folder, destFileName: destFileName); | |
var actual = wordsApi.PostReplaceText(replaceTextRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class ResetCache | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
ResetCacheRequest request = new ResetCacheRequest(); | |
wordsApi.ResetCache(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
class RunExamples | |
{ | |
static void Main(string[] args) | |
{ | |
// TODO: Get your AppSID and AppKey at https://dashboard.aspose.cloud (free | |
// registration is required). | |
Constants.AppSID = "4466c85f-1169-4569-9185-8c5da242faca"; | |
Constants.AppKey = "3d1d96346faa9b5319147c380cd538f9"; | |
Constants.MYStorage = "First Storage"; | |
//// Working With Folders /// | |
/////////////////////////// | |
//// Create Folder | |
//CreateFolder.Run(); | |
//// Copy Folder | |
//CopyFolder.Run(); | |
//// Move Folder | |
//MoveFolder.Run(); | |
//// Get Files List | |
//GetFilesList.Run(); | |
//// Delete Folder | |
//DeleteFolder.Run(); | |
////// Working With Files /// | |
///////////////////////// | |
// Upload File | |
UploadFile.Run(); | |
//// Copy File | |
//CopyFile.Run(); | |
//// Move File | |
//MoveFile.Run(); | |
//// Download File | |
//DownloadFile.Run(); | |
//// Delete File | |
//DeleteFile.Run(); | |
// Append a Document. | |
AppendaDocument.Run(); | |
//// Convert Word Document to Other Formats. | |
//ConvertWordDocumentToAnotherFormat.Run(); | |
//// Convert Word Document To Other Format With Detailed Settings and Save output to Storage. | |
//ConvertWordDocumentToAnotherFormatWithDetailedSettings.Run(); | |
//// Convert Word Document To TIFF With Detailed Settings and Save output to Storage. | |
//ConvertWordDocumentToTiffWithDetailedSettings.Run(); | |
//// Convert PDF To Word Document With Detailed Settings and Save output to Storage. | |
//ConvertPDFDocumentToWord.Run(); | |
//// Split specific Pages to new PDF Format With Detailed Settings and Save output to Storage. | |
//SplitSpecificPagesToNewPDFs.Run(); | |
//// Split specific pages to any Supported Format With Detailed Settings and Save output to Storage. | |
//SplitSpecificPagesToPNGs.Run(); | |
//// Compare Documents. | |
//CompareDocument.Run(); | |
//// Post Document Execute MailMerge. | |
//PostDocumentExecuteMailMerge.Run(); | |
//// Post Document Execute MailMerge. | |
//PutExecuteMailMergeOnline.Run(); | |
//// Get Document Field Names. | |
//GetDocumentFieldNames.Run(); | |
//// Post Document Field Names. | |
//PutDocumentFieldNames.Run(); | |
//// Get Document Field Names. | |
//PopulateMailMergeTemplateWithHTMLData.Run(); | |
//// Insert Images During MailMerge. | |
//InsertImagesDuringMailMerge.Run(); | |
//// Create New Document. | |
//CreateNewWordDocument.Run(); | |
//// Save a Webpage in a Word Document. | |
//PostLoadWebDocument.Run(); | |
//// Get Document Information. | |
//GetDocumentInfo.Run(); | |
//// Get Document Statistics. | |
//GetDocumentStatistics.Run(); | |
//// Renders Page to Specified Format. | |
//RenderPage.Run(); | |
//// Renders Paragraph to Specified Format. | |
//RenderParagraph.Run(); | |
//// Renders Table to Specified Format. | |
//RenderTable.Run(); | |
//// Renders Drawing Object to Specified Format. | |
//RenderDrawingObject.Run(); | |
//// Renders Math Object to Specified Format. | |
//RenderMathObject.Run(); | |
//// Remove all Macros from Document. | |
//DeleteDocumentMacros.Run(); | |
//// Add Header or Footer to a Document. | |
//PutHeaderFooter.Run(); | |
//// Get All Header Footer. | |
//GetAllHeaderFooters.Run(); | |
//// Get a Header or Footer in a Document. | |
//GetHeaderFooter.Run(); | |
//// Get a Header or Footer in a Section. | |
//GetHeaderFooterOfSection.Run(); | |
//// Delete all Headers and Footers from a Document. | |
//DeleteHeadersFooters.Run(); | |
//// Delete Header or Footer from a Document. | |
//DeleteHeaderFooter.Run(); | |
//// Insert Page Numbers in a Document. | |
//PostInsertPageNumbers.Run(); | |
//// Search Text in a Word Document. | |
//SearchText.Run(); | |
//// Replace Document Text. | |
//PostReplaceText.Run(); | |
//// Get a List of Sections from a Word Document. | |
//GetSections.Run(); | |
//// Get a Particular Section from a Word Document. | |
//GetSection.Run(); | |
//// Read the Page Setup of a Section. | |
//GetSectionPage.Run(); | |
//// Update the Page Setup of a Section. | |
//UpdateSectionPageSetup.Run(); | |
//// Get a List of Tables that are Contained in the Document. | |
//GetTables.Run(); | |
//// Delete a Table from a Word Document. | |
//DeleteTable.Run(); | |
//// Add Table to a Document. | |
//InsertTable.Run(); | |
//// Get a Table. | |
//GetTable.Run(); | |
//// Get Table Properties. | |
//GetTableProperties.Run(); | |
//// Update Table Properties. | |
//UpdateTableProperties.Run(); | |
//// Get a Table Row. | |
//GetTableRow.Run(); | |
//// Delete a Table Row. | |
//DeleteTableRow.Run(); | |
//// Add a Row To a Table. | |
//InsertTableRow.Run(); | |
//// Get a Table Row Format. | |
//GetTableRowFormat.Run(); | |
//// Update a Table Row Format. | |
//UpdateTableRowFormat.Run(); | |
//// Get a Table Cell. | |
//GetTableCell.Run(); | |
//// Delete a Table Cell. | |
//DeleteTableCell.Run(); | |
//// Add Cell to Table Row. | |
//InsertTableCell.Run(); | |
//// Get a Table Cell Format. | |
//GetTableCellFormat.Run(); | |
//// Update a Table Cell Format. | |
//UpdateTableCellFormat.Run(); | |
//// Get a List of Borders. | |
//GetBorders.Run(); | |
//// Get a Border. | |
//GetBorder.Run(); | |
//// Update Border Properties. | |
//UpdateBorder.Run(); | |
//// Reset Borders Properties to Default Values. | |
//DeleteBorders.Run(); | |
//// Reset Border Properties to Default Values. | |
//DeleteBorder.Run(); | |
//// Document Classification. | |
//ClassifyTaxonomyDocument.Run(); | |
//// Text Classification. | |
//RawTextClassification.Run(); | |
//// Getting Bookmarks from a Document. | |
//GetDocumentBookmarks.Run(); | |
//// Reading a Bookmark by name. | |
//GetDocumentBookmarkByName.Run(); | |
//// Updating the Boorkmark Text in a document. | |
//PostUpdateDocumentBookmark.Run(); | |
//// Get all Comments from a Word Document. | |
//GetComments.Run(); | |
//// Get Comment from Word Document. | |
//GetComment.Run(); | |
//// Add Comment to a Word Document. | |
//PutComment.Run(); | |
//// Update the Comment in a Word Document. | |
//PostComment.Run(); | |
//// Delete Comment From Word Document. | |
//DeleteComment.Run(); | |
//// Get All Document Properties. | |
//GetDocumentProperties.Run(); | |
//// Get a Particular Document Property. | |
//GetDocumentProperty.Run(); | |
//// Add New or Update Existing Document Property. | |
//CreateOrUpdateDocumentProperty.Run(); | |
//// Delete a Document Property. | |
//DeleteDocumentProperty.Run(); | |
//// Get all Drawing Objects from a Word Document. | |
//GetDocumentDrawingObjects.Run(); | |
//// Get a Particular Drawing Object. | |
//GetDocumentDrawingObjectByIndex.Run(); | |
//// Add a Drawing Object to Word Document. | |
//PutDrawingObject.Run(); | |
//// Update a Drawing Object. | |
//PostDrawingObject.Run(); | |
//// Delete Drawing Object From Document. | |
//DeleteDrawingObject.Run(); | |
//// Get Image Data from a Drawing Object. | |
//GetDocumentDrawingObjectImageData.Run(); | |
//// Get OLE file from a Drawing Object. | |
//GetDocumentDrawingObjectOleData.Run(); | |
//// Get all Fields from a Document. | |
//GetFields.Run(); | |
//// Update Fields in a Document. | |
//PostUpdateDocumentFields.Run(); | |
//// Remove Fields from a Document. | |
//DeleteFields.Run(); | |
//// Get Field from a Document. | |
//GetField.Run(); | |
//// Add Field to a Document. | |
//PutField.Run(); | |
//// Update Field Properties. | |
//PostField.Run(); | |
//// Delete Field From Document. | |
//DeleteField.Run(); | |
//// Gets the List of Fonts. | |
//GetAvailableFonts.Run(); | |
//// Reset Fonts Cache. | |
//ResetCache.Run(); | |
//// Get Footnotes from Document. | |
//GetFootnotes.Run(); | |
//// Get Footnote from a Document. | |
//GetFootnote.Run(); | |
//// Add Footnote to Document. | |
//PutFootnote.Run(); | |
//// Remove Footnote from a Document. | |
//DeleteFootnote.Run(); | |
//// Update Footnote Properties. | |
//PostFootnote.Run(); | |
//// Get Form Fields from Document. | |
//GetFormFields.Run(); | |
//// Get Representation of a Form Field. | |
//GetFormField.Run(); | |
//// Add Form Field to Paragraph. | |
//PutFormField.Run(); | |
//// Update Properties of a Form Field. | |
//PostFormField.Run(); | |
//// Remove Form Field from Document. | |
//DeleteFormField.Run(); | |
//// Get Hyperlink from a Document. | |
//GetDocumentHyperlinkByIndex.Run(); | |
//// Get all Hyperlinks from a Document. | |
//GetDocumentHyperlinks.Run(); | |
//// Get OfficeMath Objects from Document. | |
//GetOfficeMathObjects.Run(); | |
//// Get a OfficeMath Object from Document. | |
//GetOfficeMathObject.Run(); | |
//// Remove OfficeMath Object from Document. | |
//DeleteOfficeMathObjec.Run(); | |
//// Get Text from the First Two Paragraphs in the Document. | |
//GetParagraphsText.Run(); | |
//// Save the Selected Range as a New Document. | |
//SaveTheSelectedRanageAsANewDocument.Run(); | |
//// Get all Paragraphs from a Word Document. | |
//GetDocumentParagraphs.Run(); | |
//// Get a Particular Paragraph from a Word Document. | |
//GetDocumentParagraph.Run(); | |
//// Add Paragraph to Document. | |
//PutParagraph.Run(); | |
//// Remove Paragraph from Document. | |
//DeleteParagraph.Run(); | |
//// Get all the Formatting for a Paragraph. | |
//GetDocumentParagraphFormat.Run(); | |
//// Update Paragraph Format Properties. | |
//PostDocumentParagraphFormat.Run(); | |
//// Update Font Properties of the Text. | |
//PostDocumentParagraphRunFont.Run(); | |
//// Get all Runs in the Paragraph. | |
//GetDocumentParagraphRuns.Run(); | |
//// Add Run to Paragraph. | |
//PutRun.Run(); | |
//// Get a Run in the Paragraph. | |
//GetDocumentParagraphRun.Run(); | |
//// Update Run Properties. | |
//PostRun.Run(); | |
//// Remove Run from Document. | |
//DeleteRun.Run(); | |
//// Get Font of Run. | |
//GetDocumentParagraphRunFont.Run(); | |
//// Update Font Properties. | |
//PostDocumentParagraphRunFont.Run(); | |
//// Delete the watermark from a Word Document. | |
//DeleteDocumentWatermark.Run(); | |
//// Insert a Watermark Image into a Word Document. | |
//PostInsertDocumentWatermarkImage.Run(); | |
//// Insert a Watermark Text into a Word Document. | |
//PostInsertDocumentWatermarkText.Run(); | |
//// Get Document Protection Info. | |
//GetDocumentProtection.Run(); | |
//// Protect the unprotected Document. | |
//PutProtectDocument.Run(); | |
//// Remove the Protection from the Document. | |
//UnprotectDocument.Run(); | |
//// Accept all Revisions in a Document. | |
//AcceptAllRevisions.Run(); | |
//// Reject all Revisions in a Document. | |
//RejectAllRevisions.Run(); | |
} | |
} | |
} |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class SaveTheSelectedRanageAsANewDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "RangeGet.doc"; | |
string rangeStart = "id0.0.0"; | |
string rangeEnd = "id0.0.1"; | |
RangeDocument rangeDoc = new RangeDocument() { DocumentName = "Out_Range.docx" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SaveAsRangeRequest request = new SaveAsRangeRequest(fileName, rangeStart, rangeDoc, rangeEnd, null, Constants.MYStorage, null, null); | |
DocumentResponse result = wordsApi.SaveAsRange(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class SearchText | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string pattern = "aspose"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SearchRequest request = new SearchRequest(fileName, pattern, null, Constants.MYStorage, null, null); | |
SearchResponse result = wordsApi.Search(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "DinnerInvitation.docx"; | |
var destFileName = "InviterAdded.docx"; | |
var data = File.ReadAllText(@"c:\Data\" + "Inviter.xml"); | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
// Execute Mail Merge Operation first time | |
var executeMailMergeRequest = new PostDocumentExecuteMailMergeRequest(fileName, data, folder, destFileName: destFileName, withRegions: false); | |
var actual = wordsApi.PostDocumentExecuteMailMerge(executeMailMergeRequest); | |
// Execute Mail Merge Operation second time | |
fileName = destFileName; | |
destFileName = "FinalDinnerInvitation.docx"; | |
data = File.ReadAllText(@"c:\Data\" + "Clients.xml"); | |
executeMailMergeRequest = new PostDocumentExecuteMailMergeRequest(fileName, data, folder, destFileName: destFileName, withRegions: false); | |
actual = wordsApi.PostDocumentExecuteMailMerge(executeMailMergeRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class SplitAllPagesToNewPDFs | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "pdf"; | |
string folder = null; // Because the resource document exists at the root of the storage | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SplitDocumentRequest request = new SplitDocumentRequest(fileName, folder, Constants.MYStorage, null, null, null, format, null, null); | |
SplitDocumentResponse result = wordsApi.SplitDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class SplitSpecificPagesToNewPDFs | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "pdf"; | |
string folder = null; // Because the resource document exists at the root of the storage | |
int from = 1; // Splitting starts from the first page of the document | |
int to = 2; // splitting ends at the last page of the document | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SplitDocumentRequest request = new SplitDocumentRequest(fileName, folder, Constants.MYStorage, null, null, null, format, from, to, null, null); | |
SplitDocumentResponse result = wordsApi.SplitDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class SplitSpecificPagesToPNGs | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
string format = "png"; | |
string folder = null; // Because the resource document exists at the root of the storage | |
int from = 1; // Splitting starts from the first page of the document | |
int to = 1; // splitting ends at the last page of the document | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
SplitDocumentRequest request = new SplitDocumentRequest(fileName, folder, Constants.MYStorage, null, null, null, format, from, to, null, null); | |
SplitDocumentResponse result = wordsApi.SplitDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UnprotectDocument | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "SampleProtectedBlankWordDocument.docx"; | |
ProtectionRequest body = new ProtectionRequest() { Password = "aspose" }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UnprotectDocumentRequest request = new UnprotectDocumentRequest(fileName, body, null, Constants.MYStorage, null, null, null); | |
ProtectionDataResponse result = wordsApi.UnprotectDocument(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateBorder | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
string sourcePath = "tables/1/rows/0/cells/0/"; | |
Border body = new Border() { BorderType = Border.BorderTypeEnum.Left, Color = new XmlColor() { Alpha = 2 }, DistanceFromText = 6.0, LineStyle = Border.LineStyleEnum.DashDotStroker, LineWidth = 2.0, Shadow = true }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateBorderRequest request = new UpdateBorderRequest(fileName, body, sourcePath, "Line", null, Constants.MYStorage, null, null, null, null, null); | |
BorderResponse result = wordsApi.UpdateBorder(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var updateDocumentFieldsRequest = new PostUpdateDocumentFieldsRequest(fileName, folder); | |
var actual = wordsApi.PostUpdateDocumentFields(updateDocumentFieldsRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var runIndex = 0; | |
var destFileName = "PostDocumentParagraphRunFont.docx"; | |
var fontDto = new Font { Bold = true }; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphRunFontRequest = new PostDocumentParagraphRunFontRequest(fileName, fontDto, "paragraphs/0", runIndex, folder, destFileName: destFileName); | |
var actual = wordsApi.PostDocumentParagraphRunFont(documentParagraphRunFontRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
var image = "aspose-cloud.png"; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postDrawingObjectRequest = new PostDrawingObjectRequest(fileName, "{\"Left\": 0}", File.OpenRead(@"c:\Data\" + image), 0, folder); | |
var actual = wordsApi.PostDrawingObject(postDrawingObjectRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "GetField.docx"; | |
var fieldIndex = 0; | |
var destFileName = "UpdatedDocument.docx"; | |
var body = new Field { Result = "3", FieldCode = "{ NUMPAGES }", NodeId = "0.0.3" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postFieldRequest = new PostFieldRequest(fileName, body, fieldIndex, folder, nodePath: "sections/0/paragraphs/0", destFileName: destFileName); | |
var actual = wordsApi.PostField(postFieldRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Footnote.doc"; | |
var index = 0; | |
var footnote = new Footnote { Text = "new text is here" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postFootnoteRequest = new PostFootnoteRequest(fileName, footnote, index, folder); | |
var actual = wordsApi.PostFootnote(postFootnoteRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateList | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestUpdateList.doc"; | |
int listId = 1; | |
var body = new ListUpdate(); | |
body.IsRestartAtEachSection = true; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateListRequest request = new UpdateListRequest(fileName, body, listId, null, Constants.MYStorage); | |
ListResponse result = wordsApi.UpdateList(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateListLevel | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestUpdateListLevel.doc"; | |
int listId = 1; | |
int listLevel = 1; | |
var body = new ListLevelUpdate(); | |
body.Alignment = ListLevelUpdate.AlignmentEnum.Right; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateListLevelRequest request = new UpdateListLevelRequest(fileName, body, listId, listLevel, null, Constants.MYStorage, null, null, null); | |
ListResponse result = wordsApi.UpdateListLevel(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "test_multi_pages.docx"; | |
string folder = null; // File exists at the root of the storage | |
var body = new ParagraphFormat | |
{ | |
Alignment = ParagraphFormat.AlignmentEnum.Right | |
}; | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var documentParagraphFormatRequest = new PostDocumentParagraphFormatRequest(fileName, body, string.Empty, 0, folder); | |
var actual = wordsApi.PostDocumentParagraphFormat(documentParagraphFormatRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateParagraphListFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "ParagraphUpdateListFormat.doc"; | |
int index = 0; | |
var body = new ListFormatUpdate(); | |
body.ListId = 2; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateParagraphListFormatRequest request = new UpdateParagraphListFormatRequest(fileName, body, "", index, null, Constants.MYStorage, null, null, null, null, null); | |
ParagraphListFormatResponse result = wordsApi.UpdateParagraphListFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "FormFilled.docx"; | |
var formfieldIndex = 0; | |
var destFileName = "UpdatedDocument.docx"; | |
string folder = null; // File exists at the root of the storage | |
FormFieldTextInput body = new FormFieldTextInput | |
{ | |
Name = "FullName", | |
Enabled = true, | |
CalculateOnExit = true, | |
StatusText = string.Empty, | |
TextInputType = FormFieldTextInput.TextInputTypeEnum.Regular, | |
TextInputDefault = string.Empty | |
}; | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var postFormFieldRequest = new PostFormFieldRequest(fileName, body, formfieldIndex, folder, nodePath: "sections/0", destFileName: destFileName); | |
FormFieldResponse actual = wordsApi.PostFormField(postFormFieldRequest); | |
var formFieldTextInput = actual.FormField as FormFieldTextInput; |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "Run.doc"; | |
var run = new Run { Text = "run with text" }; | |
string folder = null; // File exists at the root of the storage | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var runRequest = new PostRunRequest(fileName, run, "paragraphs/1", 0, folder); | |
var actual = wordsApi.PostRun(runRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateSectionPageSetup | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
int index = 0; | |
PageSetup body = new PageSetup() { RtlGutter = true, LeftMargin = 10.0, Orientation = PageSetup.OrientationEnum.Landscape, PaperSize = PageSetup.PaperSizeEnum.A5 }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateSectionPageSetupRequest request = new UpdateSectionPageSetupRequest(fileName, index, body, null, Constants.MYStorage, null, null, null, null, null); | |
SectionPageSetupResponse result = wordsApi.UpdateSectionPageSetup(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateStyle | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TestUpdateStyle.docx"; | |
var styleName = "Heading 1"; | |
var body = new StyleUpdate(); | |
body.Name = "My Style"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateStyleRequest request = new UpdateStyleRequest(fileName, body, styleName, null, Constants.MYStorage); | |
StyleResponse result = wordsApi.UpdateStyle(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid); | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
var fileName = "TablesGet.docx"; | |
string folder = null; // File exists at the root of the storage | |
var border = new Border | |
{ | |
BorderType = Border.BorderTypeEnum.Left, | |
Color = new XmlColor { Alpha = 2 }, | |
DistanceFromText = 6, | |
LineStyle = Border.LineStyleEnum.DashDotStroker, | |
LineWidth = 2, | |
Shadow = true | |
}; | |
// Upload input document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); | |
var borderRequest = new UpdateBorderRequest(fileName, border, "tables/1/rows/0/cells/0/", 0, folder); | |
var actual = wordsApi.UpdateBorder(borderRequest); |
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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateTableCellFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
TableCellFormat body = new TableCellFormat() { WrapText = true, BottomPadding = 5.0, FitText = true, HorizontalMerge = TableCellFormat.HorizontalMergeEnum.First }; | |
string sourcePath = "sections/0/tables/2/rows/0"; | |
int index = 0; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateTableCellFormatRequest request = new UpdateTableCellFormatRequest(fileName, body, sourcePath, index, null, Constants.MYStorage, null, null, null, null, null); | |
TableCellFormatResponse result = wordsApi.UpdateTableCellFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateTableProperties | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
TableProperties body = new TableProperties() { Alignment = TableProperties.AlignmentEnum.Right, AllowAutoFit = false, Bidi = true, BottomPadding = 1.0, CellSpacing = 2.0, LeftIndent = 3.0, RightPadding = 5.0, StyleOptions = TableProperties.StyleOptionsEnum.ColumnBands, TopPadding = 6.0 }; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateTablePropertiesRequest request = new UpdateTablePropertiesRequest(fileName, body, "", index, Constants.MYStorage, null, null, null, null, null, null); | |
TablePropertiesResponse result = wordsApi.UpdateTableProperties(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UpdateTableRowFormat | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "TablesGet.docx"; | |
int index = 0; | |
TableRowFormat body = new TableRowFormat() { AllowBreakAcrossPages = true, HeadingFormat = true, Height = 10.0, HeightRule = TableRowFormat.HeightRuleEnum.Auto }; | |
string sourcePath = "sections/0/tables/2"; | |
// Upload original document to Cloud Storage | |
wordsApi.UploadFile(new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage)); | |
UpdateTableRowFormatRequest request = new UpdateTableRowFormatRequest(fileName, body, sourcePath, index, null, Constants.MYStorage, null, null, null, null, null); | |
TableRowFormatResponse result = wordsApi.UpdateTableRowFormat(request); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.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
// For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet | |
using System; | |
using System.IO; | |
using Aspose.Words.Cloud.Sdk; | |
using Aspose.Words.Cloud.Sdk.Model; | |
using Aspose.Words.Cloud.Sdk.Model.Requests; | |
namespace Aspose.Words.Cloud.Examples.CSharp | |
{ | |
public class UploadFile | |
{ | |
public static void Run() | |
{ | |
WordsApi wordsApi = new WordsApi(Constants.AppKey, Constants.AppSID); | |
try | |
{ | |
string fileName = "test_multi_pages.docx"; | |
UploadFileRequest request = new UploadFileRequest(File.Open("..\\..\\..\\Resources\\" + fileName, FileMode.Open), fileName, Constants.MYStorage); | |
FilesUploadResult response = wordsApi.UploadFile(request); | |
Console.WriteLine("Expected response type is FilesUploadResult: " + response.Uploaded.Count.ToString()); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("Exception while calling Api: " + e.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
// For a complete example and data file, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/blob/master/Examples/Aspose.Words.Cloud.Sdk.Examples/HeaderFooter/InsertHeadersAndPageNumbersToAWordDocument.cs | |
string MyAppKey = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
string MyAppSid = ""; // Get AppKey and AppSID from https://dashboard.aspose.cloud/ | |
StorageApi storageApi = new StorageApi(MyAppKey, MyAppSid); | |
string fileName = "Sample-Document.docx"; | |
// Upload source document to Cloud Storage | |
PutCreateRequest request = new PutCreateRequest(fileName, File.OpenRead(@"c:\Data\" + fileName), null, null); | |
storageApi.PutCreate(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment