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.

Images in the Html file are not showing in the converted pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

108869 May 16,2013 08:55 AM Jun 6,2013 06:10 AM ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
viji
Asked On May 16, 2013 08:55 AM

My html file is containing a image and I placed both my html file and the image in the same folder App_Data.

Sample HTML file:

<div style='font-size: 10pt'><p align='center'><font size='5' style='font-weight: bold;'>Hello world</font><br><font style='color: rgb(128, 128, 128);' size='2'>5/16/2013</font><br><img src='Chart.png' alt='Image' style='width: 150px; height: 113px; '></p><p>Hello world</p><div>

I tried my HTML file using your sample application 'Html to pdf(Html String)14949383871505149555.zip' (HtmlToPDF.aspx).

No issues with the Html string. Only the image in the html file is not properly rendering. The alternate text for the image only displaying in the converted pdf. 

 

steps to replicate:

1. place a html file and an image in App_Data folder

2. refer the image in the html file like the html which I placed above.

3. try the html file using 'Html to pdf(Html String)14949383871505149555.zip' (HtmlToPDF.aspx).

 

If the issue is with the path of the image, plz tell me, how to give the image path.

 

Thanks,

Yash


viji
Replied On May 17, 2013 04:49 AM

And my html page converted as metafile doesn't have the text searchable option in Adobe. Please tell me, how to achieve this.

Thanks,
Viji


Praveenkumar H [Syncfusion]
Replied On May 22, 2013 01:27 AM

Hi Viji,

Could you please open a new direct – trac incident with subject line as Forum 108869 - Images in the Html file are not showing in the converted pdf.  So that it would be possible for us to provide more details regarding this issue.

Thanks,
Praveen

KarthikeyanC [Syncfusion]
Replied On June 6, 2013 06:10 AM

Hi Viji,

Thank you for your patience, please find the response below.

When converting HTML to PDF from string, the HTMLConverter saves it as an html file and then navigate to the page using WebBrowser control to convert into image. Hence it is recommended to have the absolute path of the image from disk or the link of the uploaded image.

Regarding the searchable text, if you running the conversion in IE 9 or IE 10 installed machines, there is a known issue with MSHTML rendering engine that it generates only bitmap image. This can be solved by updating the registry as specified in the following MSDN link:

http://msdn.microsoft.com/en-us/library/ee330732(v=vs.85).aspx#iviewobject_draw

The utility to update this change in registry is shipped with Essential Studio install. You can access it as below.

Start->Syncfusion->Essential Studio 11.1.0.21->Utilities->PDF->IE Legacy Drawing->Enable GDI Rendering

Please let me know if you have any questions.

Thanks,

Karthikeyan.C


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.

;