I have a report that displays several pie charts. When I load this page in
a browser, everything works fine. My company has a function set up that
allows me to create a PDF of a webpage. When I load this URL into that
function, the pie charts don't render. Basically I can't get any
JavaScript to run after this line:
google.charts.load('current', {'packages':['corechart']});
This used to work fine, but stopped at some point. I'm tasked with trying
to figure out what went wrong.
This is the code where I pass the URL of the page I want to generate the
PDF. I'm not sure what library we are using for that.
$url = "http://the.chkmengine.com/create.php?ispdf=true&url=$_REQUEST[url]";
// get the file
$response = file_get_contents($url);
$return = json_decode($response, true);
$url = $return[0];
$file = "$_REQUEST[filename]_" . date("Ymd", time()) . ".pdf";
wget($url, "/tmp/$file");
// now spit it back out
header("Content-Disposition: attachment; filename=$file");
header("Content-Type: application/pdf");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize("/tmp/$file"));
readfile("/tmp/$file");
die();
Any help would be appreciated. Thanks!
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/90391306-db35-4884-8866-786a582d1562%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.