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

HTML content in PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

101767 Nov 21,2011 05:17 AM UTC Apr 10,2012 04:47 AM UTC ASP.NET MVC (Classic) 10
loading
Tags: PDF
Sonam Mehta
Asked On November 21, 2011 05:17 AM UTC

Hi,

Can I export my HTML content in PDF using syncfusion PDF creator?

Can you please provide me sample code?

Thank you in Advance.


Best Regards,
Sonam Mehta


Sonam Mehta
Replied On November 21, 2011 08:31 AM UTC

Hi,


When I am using HTMLConverter I am getting following error:

ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.

Can you please reply me as soon as possible.

Thank You

Regards,
Sonam Mehta


Meikanda Nayanar [Syncfusion]
Replied On November 22, 2011 01:00 PM UTC

Hi Sonam,

Thanks for your interest in Syncfusion product,

We can export our HTML content to PDF using our product. I have created a sample to handle the scenario and attached in the below link,

Sample link:

http://www.syncfusion.com/downloads/Support/DirectTrac/86555/HTMLToPDF1414374304.zip

Please verify the sample and let us know if this helps,

Please let us know if you need any further clarifications,

Regards,
Meikanda Nayanar



Sonam Mehta
Replied On November 23, 2011 08:37 AM UTC

Hi,


Here I have attached sample code. Can you please check and let me know how can I export this thing in PDF?

Best Regards,
Sonam Mehta



MvcApplication1_e29dfb51.rar

Sonam Mehta
Replied On November 25, 2011 06:29 AM UTC

Hello Syncfusion Team,

Can anyone please reply to my post?

If you don't have any solution related to it, Please let me know.

So I will not wait for your reply and find another solution rather than Syncfusion.

Regards,

Sonam Mehta


George Livingston [Syncfusion]
Replied On November 25, 2011 07:02 AM UTC

Hi Sonam,

Thank you for your details.

Please find the sample available in the link below to achieve your target.

http://www.syncfusion.com/downloads/Support/DirectTrac/86592/MvcApplication193056037.zip

Please let us know if you have any questions.

Regards,
George



Sonam Mehta
Replied On November 25, 2011 08:58 AM UTC

Hi George Livingston,

Thank you very much for your reply.

Code you have sent is working fine. But I want to export only Map with its marker.

Can you please check attached code and give me some suggestions?

Waiting for your suggestions.

Thanks & Regards,
Sonam Mehta



MvcApplication193056037_2c900c84.rar

George Livingston [Syncfusion]
Replied On November 29, 2011 10:05 AM UTC

Hi Sonam,

Thank you for your details.

The HTML content of the map does not contain the marker. The HTML content of the map is provided in the link below. Please use the Internet explorer to open the HTML file. The converted PDF document will contain exactly the same content visible in the Internet explorer.

http://www.syncfusion.com/downloads/Support/DirectTrac/85809/HtmlContent-853434665.zip

Please find the modified sample in the link below for rendering the HTML content into a single page of the PDF document.

http://www.syncfusion.com/downloads/Support/DirectTrac/85809/MvcApplication1930560372049112674.zip

Please let us know if you have any questions.

Regards,
George



Shandao Song
Replied On April 4, 2012 03:18 PM UTC


Hi George,

Thank you very much for your MVC example. I can convert my pdf-like web page to PDF by Browser. However when using doc.ExportAsActionResult("name.pdf", HttpContext.ApplicationInstance.Response, HttpReadType.Save), IE and Chrone refuse to save. Can you please help?

Is there a way the Add footer to PDF when autoDetectPageBreak is true.

Thank you in advance.

Regards,


Shandao Song
Replied On April 4, 2012 06:35 PM UTC

Thanks again for your MVC example, George.

Another thing is HTML image tag is not show in PDF.




Can you help?

Thank you in advance.

Shandao




Geetha M [Syncfusion]
Replied On April 10, 2012 04:47 AM UTC

Hi Shandao,

Thank you for the details.

I am afraid that I am not able to reproduce the file cannot be saved problem. Also, you can add footer to the document when AutoDetectPageBreak property is set to true. Regarding the image, could you make use of Server.MapPath to load the image instead of Url.Content?

I had placed the modified sample in the following link:

MvcApplication1.zip

Could you please check this sample, modify and send back to us so that we can check the file cannot be saved problem here?

Regards,
Geetha


CONFIRMATION

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.

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

;