Convert Microsoft Word to PDF in C# .NET using Aspose.Words REST API

We’re evaluating the .net words library for doing conversion from MS Word to PDF and then found the cloud based product. Can Aspose REST cloud API do this particular conversion. If yes can you please tell me what DLL package shall add to my Visual Studio References.?

Hi Hassan,

Yes, you can convert Word documents to PDF using Aspose.Words for Cloud. You can follow these steps to get started:

  1. Please visit https://docs.aspose.cloud/display/storagecloud/Creating+and+Managing+Account and click Sign Up button to create a new account for Cloud.

  2. After creating the account, select My Apps tab and get your App SID and App Key from there.

  3. Upload your input files to Aspose for Cloud storage and use REST or SDK example from Convert Word Documents to other Formats example and SDK can be downloaded from here if you want to use Aspose Cloud SDK for .NET).

Please follow these instructions and let us know if you see any issue.

Best Regards,

Thanks for response.

I have done what you told me in the last three days.

I have added Aspose Cloud sdk for .net to my projecs in VB 2010 by “NUGet Package”

In my class I added

using Aspose.Cloud.Common;
using Aspose.Cloud;

But I get(For Rest):

Sign and UploadFileBinary

these two dose not exist in the current context

And for SDK I get:

Product and AsposeApp and Folder

these three dose not exist in the current context

On Monday I should tell my project leader about the product(If vi can use it)

I hope that you can tell me what I have down wrong.

Regards

Hassan

Hi Hassan,

We are sorry for the inconvenience. It looks like you have referenced a wrong version of the SDK. Please download the SDK from GitHub - aspose-words-cloud/aspose-words-cloud-dotnet: .NET library for communicating with the Aspose.Words Cloud API and then reference it in your application. Tests are also present there https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet/tree/master/Aspose.Words.Cloud.Sdk.Tests so you can run the tests to check the result at your end.

Please attach your application (REST and SDK) if you still see any issue.

Best Regards,

Hi

Unfortunately I could not use Rest Cloud. There were still
problem with Sign finction (not exist in current context)

But I used SDK cloud. It seems to work. We want to buy Licens for a period of time for testing erformance. But I have following questions:

Our data are person sensitive data. In my program I upload a Word file and download PDF file.

Is upload and download data transfer secure ?. Is the data encrypted?.

Can you please refer me to document about this subject.

Thanks

Best Regards

Hassan

Hi Hassan,

You can use HTTPS instead of HTTP to securely transfer your data. Please also check Security - About - aspose.app if you are concerned about the security of your data.

Best Regards,

@hashed

As an update, you can use ConvertDocument API method to convert Word documents to PDF without cloud storage. Please check the following sample C# code using the latest Aspose.Words Cloud SDK for .NET.

// Get App Key and App SID from https://dashboard.aspose.cloud/
WordsApi wordsApi = new WordsApi(MyAppSid, MyAppKey);

var request = new ConvertDocumentRequest(
    document: File.OpenRead("C:/Temp/Document.doc"),
    format: "pdf"
);

var result = wordsApi.ConvertDocument(request);
var fileStream = System.IO.File.Create("C:/Temp/Document.pdf");
result.CopyTo(fileStream);
fileStream.Close();