Error: File does not begin with '%PDF-'


#1

Hi,

I am looking for a PDF creator and would like to buy your product because it seems to be a very good one.
But When I trying your demo version of Aspose.PDF, the error message, File does not begin with '%PDF-', pops up in the browser.

I am using it in a C# web project

Please reply ASAP, Thank you very much !

Hendrix


#2

Dear Hendrix,

Thank you for considering Aspose.

1) Please make sure your code can work in a Windows project but not a web project.

2) Please refer to pdfDoc.Save() Filename should not contain path. and make sure you have used the End method.

3) If it still won’t work, please send an example that can reproduce the error to me.


#3

Hi Tommy
Thank you very much for your reply. My problem is solved, the reason is that the page actually is loaded twice and the second time when it is loading, some data stored in the session has been cleared. After reading some old threads which are related to the issure in the forum, I realize that.

Another thing which is not relating to this issue is that I have found there are some Chinese characters in web.config in your demo C# project. It wouldn’t be an issue for me since I am a Chinese, but most of the people who are not from China may get confused with that improper display in english-based OS. Hope this little note can make you a better customization.

Thanks Again!

Hendirx


#4

Dear Hendirx,

Thank you very much for notifying me the Chinese characters problem. I will modify that file soon. If you have other question about our product, please let me know. I will be more than glad to help you.