We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Convert html to pdf with AJAX control

Thread ID:





79076 Jan 20,2009 07:07 AM UTC Jan 21,2009 12:26 PM UTC WinForms 3
Tags: PDF
Asked On January 20, 2009 07:07 AM UTC


I have problem when try to convert html to pdf file (my html file contain ajax control).
The problem is the part it should display image that merge from ajax control when convert to pdf file the image didn't display as you can see in my attachment file , the above image is from pdf file and the below image is from html file how to fixed this problem.
By the way, I use Syncfusion


Geetha M [Syncfusion]
Replied On January 20, 2009 12:18 PM UTC


Thank you for the details.

Could you please send me your HTML page so that I could recreate and find the cause of the problem?


Replied On January 21, 2009 03:26 AM UTC

Hi Geetha,

Sure, my attachment contain file.html page and file.mht. I use .html page for convert to pdf file as you can see, at first time I think the part that should be display image request from WebResource.axd... but when I generate this html page there is no WebResource.axd file so that why the image didn't display.
Afther that I try to save page with .mhtml and then use it convert to pdf then the pdf file display it is empty page I don't know how to solve this problem please help.

This is code that I use for generate html file from currentUrl :

previewBrowser.Navigate(currentUrl, ref nullObject, ref nullObjStr, ref nullObjStr, ref nullObjStr);

while (previewBrowser.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE)

exportStream = new StreamWriter(tempHtlm);

html = ((mshtml.HTMLDocumentClass)previewBrowser.Document).body.outerHTML;
html = metaTag + html;

Adn then convert html to image:
HtmlConverter htmlC = new HtmlConverter()
Image metaFile = htmlC.ConvertToImage(tempHtlm, ImageType.Metafile)

I hope you understand my English.


Geetha M [Syncfusion]
Replied On January 21, 2009 12:26 PM UTC


Thank you for the details.

I am able to see that the html page you sent itself displays with cross mark instead of the image. So the generated PDF file will also be like the same.

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon