We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Uploading Documents

Not sure if I am in a right section, but I am new to using Aspose for my file conversions. At the moment I am having trouble getting the filename and extension from an html based upload. We previously used a different third party software for uploads, but are getting rid of it after moving to Aspose. What process do you recommend for uploading files that can be used in conjunction with Aspose.Pdf and/or Aspose.Words to convert the uploaded document to PDF?

Hi Brett,

Thanks for your inquiry. I think, you can simply upload files via ASP.NET and then pass in the stream to Aspose.Words document object model to be able to convert any Word document to PDF format. Please try using the following code snippet:

// Load the Word document into a stream.
MemoryStream stream = new MemoryStream(dataBytes);

LoadOptions lo = new LoadOptions();
lo.LoadFormat = LoadFormat.Docx;

Document doc = new Document(stream, lo);

// Save the document to disk.
// The extension of the filename can be changed to save the document into other formats. e.g PDF, DOCX, ODT, RTF.
doc.Save(MyDir + "Out.pdf");

I hope, this will help.
Best Regards,

Should have also noted that I am trying to do this is Classic ASP.

Thank you for the response. I should’ve re-loaded the page before writing my previous post. The problem lies in the fact that I am trying to accomplish this through classic ASP. I am uploading the file through HTML, and trying to obtain the filename / path from that form. How would I go about converting your suggestion to classic ASP?

Hi Brett,


Thanks for your inquiry. Please note that Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks. Aspose.Words supports DOC, DOCX, RTF, HTML, OpenDocument, PDF, XPS, EPUB and other formats. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®. For more information, please visit the following link:
http://www.aspose.com/docs/display/wordsnet/Introducing+Aspose.Words+for+.NET

Secondly, may be you can use FileFormatUtil class to be able to detect and return the information about a format of a document stored in a disk file.

Please let me know if I can be of any further assistance.

Best Regards,

Hi Brett,

Thanks for your interest in our products.

I am a representative from Aspose.Pdf team. Please note that Aspose.Pdf for .NET provides the capability to create/edit/manipulate PDF documents. It also provides the capability to use it under unmanaged code with the help of COM Interoperatibility. Now concerning to your requirement, you may try uploading the files using some HTML or other control and once the file is saved on server, you can use that document for further processing using Aspose.Pdf for .NET. Please visit the following link for information on

Utilize Aspose.Pdf for .NET in other Programming Languages

Aspose.Pdf for .NET is a document manipulation control and I am afraid it does not directly provide the capability to upload documents over server. We are sorry for your inconvenience.