BindHTMLFromUrl and white pdf

Received : 2007/07/11 04:11:51
Message : When I'm trying your sample code:
Pdf pdf = new Pdf();
pdf.BindHTMLFromUrl(@"http://www.Aspose.net/Test.html","GET");
pdf.Save(@"C:/xml/Test.pdf");

The pdf is a white page.

I'm not using code behind but code-inside.

Thanks for your answer


This message was posted using Aspose.Live 2 Forum

Can you please provide the HTML file and let us test it?

The html page is http://www.Aspose.net/Test.html

I can’t access that page. Can you please attach the file in this thread? I will test it at my local server. Please also make sure you can access that page correctly.

You can find your sample : https://docs.aspose.com/html/net/convert-html-to-pdf/

(Html File as a Web URL)

http://www.aspose.net/Test.html can be access successfully.

Thanks

It’s works fine with http://www.Aspose.com/Test.html and not http://www.Aspose.net/Test.html like in your sample!!!

Thanks very much for your answers

I think that code is only an example. The html page does not exist at all. You should use some valid url for test.

http://www.Aspose.net/Test.html is a valid url and come from your sample.

See attachment.

I just want say to you that your sample code is not working.

Hi,

Thank you for considering Aspose.

I have checked the problem you have raised and found that this page does exists. The problem is that Aspose.Pdf Html2Pdf functionality has some limitations. You can check those limitations at:

This URL given in the documentation was just a sample for the user. Even right now it is underconstruction, but it contains CSS, which is not supported hence when they are parsed they throws exception and hence blank PDF is created. We are working to improve its functionality. You can try some other URL. Hope you understand.

Thanks.

Adeel Ahmad
Support Developer
Aspose Changsha Team

Thank you for your answer.

Just change www.aspose.net by www.aspose.com in your sample and it will be ok.

Hi,

Alright, we will change it.

Thanks for your co-operation.

Adeel Ahmad
Support Developer
Aspose Changsha Team