Welcome Guest Search | Active Topics | Sign In | Register

Converting Google visualization pie chart - fails on windows 2008 Options
Joseph Malka
Posted: Wednesday, August 20, 2014 9:21:24 AM
Rank: Member
Groups: Member

Joined: 10/17/2013
Posts: 22
Converting the HTML below to PDF works fine on Windows 7 machine, but fails on Windows 2008 machine.
The HTML was not invisible in IE8, but is now visible after I installed IE11.

Do I have to install some other infrastructure on the windows 2008, or Is it a bug?


<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);

var options = {
title: 'My Daily Activities',
is3D: true,
};

var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="piechart_3d" style="width: 900px; height: 500px;"></div>
</body>
</html>
eo_support
Posted: Wednesday, August 20, 2014 12:41:22 PM
Rank: Administration
Groups: Administration

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

EO.Pdf does not have any external dependencies. So you do not need install anything else. The problem might be a timing issue. When you use JavaScript generating contents, EO.Pdf does not know when your JavaScript has finished running, so it might start convert even before the chart is generated. You can try to increase HtmlToPdf.Options.MinLoadWaitTime and see if it resolves the problem for you. Alternatively, you can also use manual trigger:

http://www.essentialobjects.com/doc/4/htmltopdf/eo_js.aspx#manual_trigger

Manual trigger feature allows you to explicitly trigger the conversion through JavaScript code when the page is in a "ready to render" stage (for example, after the chart is fully generated).

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.