This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for .NET.
For more information, please visit
This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for .NET.
For more information, please visit
This Gist contains code snippets related to conversion DOC file to PDF using Aspose.Words Cloud SDK for .NET |
// get client credentials from https://dashboard.aspose.cloud/ | |
string clientSecret = "388e864b819d8b067a8b1cb625a2ea8e"; | |
string clientID = "718e4235-8866-4ebe-bff4-f5a14a4b6466"; | |
// create an instance of WordsApi | |
WordsApi wordsApi = new WordsApi(clientSecret, clientID); | |
// input DOC file name | |
string inputFile = "TableDocument.doc"; | |
// output file name | |
string resultantFile = "Converted.pdf"; | |
// output document format | |
string format = "pdf"; | |
try { | |
// Create GetDocumentWithDormatRequest and provide input and output file names | |
GetDocumentWithFormatRequest request = new GetDocumentWithFormatRequest(inputFile, format, null, null, null, null, resultantFile); | |
// perform document conversion | |
Stream result = wordsApi.GetDocumentWithFormat(request); | |
} | |
catch (Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); | |
} |