Free Support Forum -

Aspose.HTML can't open a file with '%' characters in the filename

I’ve noticed when I try to open a document which contains a ‘%’ sign in the filename, Aspose.Html throws the FileNotFoundException. I suspect this isn’t the only special character that would cause a similar issue, but I haven’t checked any others.



Thanks for contacting support.

Can you please share source files to further investigate this issue in details.

Hi @Adnan.Ahmad,
It’s just one line of code:
new Aspose.Html.HTMLDocument(@"C:\MyFile%3A.html");

I suspect it’s parsing %3A as ‘:’ using the HTML URL encoding.


Thanks for informing this. Here source file means source HTML file which you are opening on your end using Aspose.

Yes, I’m opening a HTML file from disk.


Please share that HTML file with us to further investigate this issue. I also like to inform that some issues are document specific so we need that file to help you out.

The issue is about the filename, not about the contents. The contents of the file can be completely anything, even a 0 bytes file - it just happens for every HTML file which contains HTML URL encoded characters in the filename, e.g. “%3A.html”.


We have logged an investigation ticket as HTMLNET-2558 in our issue tracking system. We will further investigate the scenario in details and keep you posted with the status of ticket resolution. Please spare us little time.

We are sorry for the inconvenience.