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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

searchable pdf from Html

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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

Anatoliy

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);

Samples:
--------

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

Herewith I have attached the sample for your reference:
http://websamples.syncfusion.com/samples/PDF.Windows/P33790//main.htm

Here is a PDF generated with bitmap option:
HTML to PDF-BMP.zip

Kindly let me know if you have any other questions.

Thanks,
Melba

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?

Anatoliy

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:

[C#]

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

Kindly let me know if you have any other questions.

Thanks,
Melba

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.

Anatoliy

Sync13.zip

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.

Thanks,
Melba



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

;