Merge multiple Word documents and Convert to PDF in C# with Aspose.Words REST API

Hi,

I’m running a C# cloud application where the docx files are being stored, so I can’t point to the path of the file. but I do have the file as stream or byte array.

Can you please point me to the code that I need to use in my application so I could upload the docx files to the aspose cloud and then do the merging.

I’m looking to purchase a license and this is my last test before I do so.

Looking forward to having your advice.

Thanks,
Raz

I found this code Merge several documents into one|Documentation
My problem is that I can’t use FileStream I can create a MemoryStream of the file.

How can I use the UploadFileRequest class with the file as memory stream and not file stream?

Thanks,
Raz

@dev1sheeta

It seems you need to convert the MemoryStream to FileStream for this purpose. Please check the following stackoverflow post. Hopefully, it will help you to accomplish the task.

Convert MemoryStream to FileStream in C#

Thank you very much

I’m trying to understand if I can use files in my application.

Is there another way to do the merging?

@dev1sheeta

I am afraid Aspose.Words Cloud API uses FileStream for merging Word documents. However, if you want to make any change in the functionality then you can self-host Aspose.Words for .NET(on-premise API) yourself to append/merge documents.