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

searchable pdf from Html

Thread ID:





63042 Jun 27,2007 11:56 AM UTC Jun 28,2007 11:57 AM UTC ASP.NET Web Forms (Classic) 5
Tags: PDF
Anatoliy Krysan
Asked On June 27, 2007 11:56 AM UTC


In your release notes http://www.syncfusion.com/support/releasenotes/
mentioned that Syncfusion support convertion Html to PDF and PDF document remains searchable. How to do it? Thank you for quick response.


Melba Winshia [Syncfusion]
Replied On June 27, 2007 12:25 PM UTC

Hi Anatoliy,

Yes, We provide support for converting html web page to PDF file. While converting HTML web page to PDF, it converts the web page into image [Bitmap image or metafile] using HtmlConverter and renders that image into PDF.

* Bitmap image will have low resolution but the conversion will be fast. Metafile will be slow, but will have high resolution and text in it is readable.

* The HTMLConverter uses the MSHTML rendering library to render HTML documents. The MSHTML library is the engine that is used to drive the Internet Explorer.

Steps to convert the HTML page to PDF

Using HtmlConverter, we can convert as follows:

i) The HTML page is first converted to a bitmap image or a Metafile.
Image bmp = html.ConvertToImage("Sample.html"),ImageType.Bitmap)

ii) Then the image is drawn into the PDF document.
doc.LastPage.Graphics.DrawImage(PointF.Empty, bmp, dest, properties);


You can find the sample regarding this at the following url:
C:\Program Files\Syncfusion\Essential Studio\\Windows\Pdf.Windows\Samples\Grid Model\HTMLToPDF

Herewith I have attached the sample for your reference:

Here is a PDF generated with bitmap option:

Kindly let me know if you have any other questions.


Anatoliy Krysan
Replied On June 27, 2007 12:38 PM UTC

Hi Melba,

But after converting PDF to bitmap and bitmap to PDF the resulting PDF is not searchable. It is like normal image. I can't select some text and copy to buffer. I can't press Ctl+F and find some word. Does Syncfusion allow convert Html to SEARCHABLE PDF?


Melba Winshia [Syncfusion]
Replied On June 27, 2007 01:24 PM UTC

Hi Anatoliy,

If you convert to metafile instead of bitmap you can search the text. Please refer the following code snippet to achieve this:


Image bmp = html.ConvertToImage("Sample.html"),ImageType.Metafile)

Kindly let me know if you have any other questions.


Anatoliy Krysan
Replied On June 27, 2007 01:58 PM UTC

Hi Melba,

I was try to make PDF how you recommend but it's doesn't help. Please find attached ZIP file. Sync_Input.png - input details
htmltopdf.pdf - result PDF.
What I did wrong because PDF still not searchable.



Melba Winshia [Syncfusion]
Replied On June 28, 2007 11:57 AM UTC

Hi Anatoliy,

Could you please open a new direct – trac incident with subject line as Forum 63042 - searchable pdf from Html? So that it would be possible for us to provide more details regarding this issue.



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