Refer below code, I am unable to trace the namespaces for highlighted classes. I am using aspose.cloud as a namespace for below code
string appSID = “******************”;
string appKey = “******************”;
string fileName = “MyFile.docx”;
//build URI to convert MS Word file to other format using storage
string strURI = “http://api.aspose.com/v1.1/words/” + fileName + “?format=pdf”;
//Use the following line to use API version 1.1
//string strURI = “http://api.aspose.com/v1.1/words/” + fileName + “?format=pdf”;
//sign URI
string signedURI = Sign(strURI, appSID, appKey);
//get response stream
Stream responseStream = ProcessCommand(signedURI, “GET”);
using (Stream fileStream = System.IO.File.OpenWrite(“c:\temp\MyFile.pdf”))
{
CopyStream(responseStream, fileStream);
}
responseStream.Close();
// Get App Key and App SID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(MyAppKey, MyAppSid);
var request = new ConvertDocumentRequest(
document: File.OpenRead("C:/Temp/Test File.docx"),
format: "pdf"
);
var convertDOCXtoPDFResult = wordsApi.ConvertDocument(request);
var fileStream = System.IO.File.Create("C:/Temp/Test.pdf");
convertDOCXtoPDFResult.CopyTo(fileStream);
fileStream.Close();