Reputation: 1131
I am using googlechartphplib to generate my charts. They are generated as images. Heres an example of one image - Click Here. I store this url as $pie_chart1_url
.
I am trying to make a pdf file, and i want to put this image inside this pdf. I am using fpdf class for this. I dont understand why am i having this problem:
$pdf->Image($pie_chart1_url, 0, 40, 0, 0, 'png');
Getting this error:
FPDF error: Can't open image file: http://chart.apis.google.com/chart....` error.
If i write it manually:
$pdf->Image('http://chart.apis.google.com/chart?cht=pc&chs=200x200&chtt=Svetain%C4%97+veik%C4%97%3F&chd=t%3A50.00%2C40.00&chco=25C114%2CC11425&chl=50%7C40&chdl=Taip%7CNe&chdlp=bs', 0, 40, 0, 0, 'png');
It works without any errors..
Upvotes: 1
Views: 12816