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.
Syncfusion Feedback

Syncfusion Grid in HTML to PDF Conversion Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

115945 Mar 3,2014 06:30 PM UTC Nov 10,2014 05:04 PM UTC ASP.NET Web Forms (Classic) 13
loading
Tags: PDF
Anthony Lofton
Asked On March 3, 2014 06:30 PM UTC

I am attempting to convert a web page (that contains a Syncfusion grid) to a PDF document.  When I attempt to call the code to convert the HTML, the grid is missing from the PDF document.  It seems like the conversion is happening before the grid is rendered.  

http://my.eapptrack.com/eAppTrack/Reports/inserts/pdfreport.aspx?uid=2&rid=179

The above link will load a simple report and a title.  You'll see that the only thing that comes over in the PDF document is the title and the grey background.

Why won't my grid show up?

KarthikeyanC [Syncfusion]
Replied On March 4, 2014 04:12 AM UTC

Hi Anthony,

Thank you for your interest in Syncfusion Products.

 

Could you please check whether you have enabled JavaScript while conversion, and you can also add Additional Delay to load the HTML during the conversion. Please refer the below code snippet:

            using (HtmlConverter html = new HtmlConverter())

            {

                html.EnableJavaScript = true;

                html.EnableBinaryBehaviors = true;

                html.AdditionalDelay = 1000;

Please let us know if you need any further assistance.

Thanks,

Karthikeyan.C


Anthony Lofton
Replied On March 4, 2014 03:40 PM UTC

I did what you suggested and it still only shows the top portion with the title and the grey background.  I tried at 5 seconds and even 30 seconds.   

http://my.eapptrack.com/eAppTrack/Reports/inserts/pdfreport.aspx?uid=2&rid=5

Here is the URL. When it runs in the browser it loads sub second.  I added text below the grid (a Javascript Syncfusion grid) and when the code converts the page it shows the title above and the text below, but not the grid.  I have some Syncfusion charts on one of my reports, they don't show either.  






KarthikeyanC [Syncfusion]
Replied On March 7, 2014 09:43 AM UTC

Hi Anthony,

I am afraid that I am not able to reproduced this issue, I have attached a sample project which we have tried for your reference.

Sample

 

Please try this sample and let us know if you have any concern.
Thanks,

Karthikeyan.C


Anthony Lofton
Replied On March 18, 2014 02:01 PM UTC

Sorry for the delay.  

I used your code exactly and still got the same result.  The PDF is created, but it does not have the grid on it.  Run the web page link that I sent in a browser window and you will see it contains a Syncfusion Grid.

http://my.eapptrack.com/eAppTrack/Reports/inserts/pdfreport.aspx?uid=2&rid=5

When you run the URL through the Convert to PDF process the grid does not display.  I have attached the resultant PDF that your code generated.  It is what I have been getting all along.

Attachment: Report_f8987b70.zip

KarthikeyanC [Syncfusion]
Replied On March 19, 2014 06:03 AM UTC

Hi Anthony,

In the attached PDF document we have found that the PDF contains bitmapped output so the grid may not work. With IE 9 there is a known issue that it generates only raster image. You can get more information on this from the following link:

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

As explained, to solve this, the key FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI should be updated in the registry. Please run the utility placed in the following location to perform the above changes automatically.

$system drive:\Program Files\Syncfusion\Essential Studio\$Version # \Utilities\PDF\Legacy Drawing

Please try this and let us know if you need any further assistance.

Thanks,

Karthikeyan.C


Anthony Lofton
Replied On March 19, 2014 02:39 PM UTC

I ran the app to make the change in the registry.

Still does not work.

Are you able to get it to work?  If so, can you send me the resultant PDF?

KarthikeyanC [Syncfusion]
Replied On March 21, 2014 04:51 AM UTC

Hi Anthony,

Could you please conform you have run the Legacy tool with elevated permission and make sure that the FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI at both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER is set as below?

Name

Type

Data

*

REG_DWORD

0x00000001

I have attached the generated PDF document for your reference.

 

Thanks,

Karthikeyan.C


Attachment: Output_c037082d.zip

Anthony Lofton
Replied On March 25, 2014 03:56 PM UTC

Good deal!  The key was manually changing the registry for the Local Machine.  The app contained in the Syncfusion folder only changed the value in Current User registry folder on my computer.  After I made the same change in Local Machine, the grid's started showing up.

One more question/issue.  We also have charts on our reports and all though the grids show up.  The charts do not.  Below is a link to a report that has a grid on it and 2 charts.

https://my.eapptrack.com/eAppTrack/Reports/inserts/pdfreport.aspx?uid=2&rid=179

The charts are Syncfusion charts.

KarthikeyanC [Syncfusion]
Replied On March 26, 2014 10:29 AM UTC

Hi Anthony,

Thank you for your update.

 

In the attached link we could not able to see the chart present in the HTML page. We can able to convert the grid present in the link, could you please provide us the link which contains Chart so that we will check this. Meanwhile please try once again by setting the below code snippet.

            using (HtmlConverter html = new HtmlConverter())

            {

                html.EnableActiveXContents = true;

 

 

Please let us know if you have any concern.

Thanks,

Karthikeyan.C


Anthony Lofton
Replied On October 21, 2014 04:37 PM UTC

I finally am back to this and I have a page that resolves with the chart, but the PDF that is created has the chart skewed.

Here is the URL of the page I'm trying to convert:  https://my.eapptrack.com/eAppTrack/Reports/inserts/pdfreport.aspx?rid=179&pd=o&uid=2

Attached is the current result from my code.

Please help.

Anthony

Attachment: Report_10_21_d3993ff4.zip

KarthikeyanC [Syncfusion]
Replied On October 24, 2014 01:41 PM UTC

Hi Antony,

Thank you for using Syncfusion Products.

 

We are able to reproduce this issue, we will fix this issue internally and let you know.

 

Thanks,

Karthikeyan.C


Anthony Lofton
Replied On November 6, 2014 09:57 PM UTC

Can you provide and estimate as to when this issue will be fixed?  

Thank you for any information,

Anthony

KarthikeyanC [Syncfusion]
Replied On November 10, 2014 05:04 PM UTC

Hi Antony,

Thank you for your update.

 

Our Html Converter make use of MSHTML(IE rendering engine) to convert HTML to images and then the image is converted to PDF. For this specific HTML IE itself producing the incomplete image. We have reported MS in this issue, we will let you know once this issue is fixed.

Regards,

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.

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

;