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.
Unfortunately, activation email could not send to your email. Please try again.

HTML -> PDF and CSS

Thread ID:

Created:

Updated:

Platform:

Replies:

60740 May 10,2007 03:08 PM May 14,2007 08:15 PM ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Steven Domingue
Asked On May 10, 2007 03:08 PM

Does the HTML to PDF converter routine in Syncfusion 5.1 support all CSS capabilities, including formattings, divs, spans, etc?

Thanks

Sarath Kumar G [Syncfusion]
Replied On May 14, 2007 08:15 PM


Hi Steven,

Thank you for your interest in Syncfusion products and Sorry for the delayed response.

The following are the procedures to convert a file from HTML to PDF.

1) While converting a HTML web page to PDF, it converts the HTML Web Page as a Bitmap Image/Metafile
Image bmp = html.ConvertToImage("Sample.html"),ImageType.Bitmap)

2) Conversion of HTML to PDF makes use of HtmlConverter which converts HTML Webpage as a Bitmap/Metafile and then render's this Image/Metafile to the PDF document.
doc.LastPage.Graphics.DrawImage(PointF.Empty, bmp, dest, properties);

3) The Converted Bitmap will have low resolution but the conversion is fast.

4) The Converted Metafile will have high resolution but the conversion is slow.

5) HtmlConverter makes use of MSHTML library to render HTML documents. This library is nothing but the engine to drive Internet Explorer.
converts the web page into image[Bitmap image or metafile] using HtmlConverter and renders that image into PDF.

Since we are converting the HTML page to an image CSS capabilities will be retained.

Here is the sample for your reference.

http://websamples.syncfusion.com/samples/PDF.Windows/F_60740/main.htm'>http://websamples.syncfusion.com/samples/PDF.Windows/F_60740/main.htm">http://websamples.syncfusion.com/samples/PDF.Windows/F_60740/main.htm

Please let me know if you face any issues.

Regards,
Sarath

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.

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.

;