Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf - SVG renders blank using NVD3 Options
Lance
Posted: Friday, May 23, 2014 12:27:26 PM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
Hi,

We recently tried upgrading our versions of D3 and NVD3 but it causes our SVG charts to be rendered as blank on the PDF when converted. Debugging a little bit, I noticed that the HtmlToPdf.DebugConsole prints out the following message during the conversion:

Quote:
undefined:
JS ERROR:
TypeError: 'undefined' is not a function


The error doesn't occur when loaded through Chrome or Firefox, however. So I imagine there may be an issue executing the javascript during the PDF conversion but not when loading in a normal browser?

I've created an example page which shows the issue that can be downloaded through the link below:

[link removed since the issue has been resolved]

I'm using the latest posted version of EO.Pdf: 5.0.77.2

Thanks,

Lance
eo_support
Posted: Saturday, May 24, 2014 10:33:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

We have looked into the problem. The root of the problem is we do not support Function.bind method. In order to resolve the issue, you can add the following code before you include any of D3 and NVD3 script code:

Code: JavaScript
Function.prototype.bind = function(thisObj)
{
    var args = arguments;
    var fx = arguments.callee;
    return function()
    {
        fx.call(thisObj, args);
    }
}


Once you add this the conversion should complete without errors.

Thanks!
Lance
Posted: Sunday, May 25, 2014 2:41:00 AM
Rank: Member
Groups: Member

Joined: 5/28/2013
Posts: 10
Thank you for looking into the issue and providing a fix for it. I appreciate it!
eo_support
Posted: Sunday, May 25, 2014 9:10:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
You are very welcome. Please feel free to let us know if there is anything else.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.