I have a scrip that i want to display it in PDF. This display a graph i want to know how can i display it in PDF. If anyone can help here!! Thank you!! in Advance!
Code:
<?
require("../includes/class_graph.php");
$defaultValues=array(
'from'=>$from=(time()-7*3600-60*date("i",time())-date("s",time())),
'to'=>$from+8*3600,
'y_min'=>0, // Default y-min value
'y_max'=>30, // Default y-max value
'graph_width'=>750, // Default Graph width
'graph_height'=>300, // Default Graph height
'graph_indent_x'=>50, // If long values are display on the y-axis (215434 Degree), and the number is cropped, you might want to increase this number
'graph_indent_y'=>30,
'intervall'=>30, // This should always be intervall time
'overallunit'=>'psi', // This is the unit display on the y-axis
'pdfReportable'=>true
);
$lines=array(
new Line("#0CAB46","Juice Out Trim Cooler","pet_juice_press",'psi',true,'Div10','Div10'),
new Line("#FF0000","Hot Water Loop","pet_hot_water_press",'psi',true,'Div10','Div10'),
new Line("#FF6215","Juice Out Pre-Heater","pet_juice_out_preheat_press",'psi',true,'Div10','Div10'),
new Line("#0000FF","Pre-Heater Water In","pet_waste_water_press",'psi',true,'Div10','Div10'),
);
$g=new Graph(
$defaultValues,
// Table + comma
'pet_juice_pressure',
// Page Title in quotes + comma after
'PET Line Differential Pressure',
// Graph Title in quotes
'Pressure'
);
$g->Display($lines);