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

Free Support Forum - aspose.com

Problem converting input steam to PDF without using storage

Hi


I’ve been following on of the examples to convert a docx file to pdf without using storage but it’s complaining about the input type being unrecognised. The sample I’m following is this: http://www.aspose.com/docs/display/wordscloud/Convert+Word+to+other+File+Formats+without+using+the+Cloud+Storage

Anybody had any similar issues or does anyone have any working code they can show me?

This is the message I get back

HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Mon, 23 Jun 2014 18:03:50 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 34
Connection: keep-alive

{“Message”:“Unknown file format.”}

Thanks
Jon

Ok for anyone else who has this problem make sure in the ProcessCommand method you call this line:


streamContent.Seek(0, SeekOrigin.Begin);

Hi there,

Thanks for your inquiry. Yes, you can call Stream.Seek(0, SeekOrigin.Begin) method before calling the ProcessCommand method to avoid any exception. Please let us know if you still face any issue.