Print .topdf() for php

Hi,

Do you have any full tutorial for “php newbies” for printing with .toPDF ?
I use a button like this :

pti_grid.toPDF('http://myip/view?template=tools/dhtmlx_pro_full_terrace_skin/grid-pdf-php/generate.php')

With this in the head of my page :
[code]

[/code]

and I had unzip the grid-pdf-php folder under my dhtmlx folder (dhtmlx_pro_full_terrace_skin\grid-pdf-php)

I have php5 installed.

In result I have a white page with this is the source code :

[code]

[/code]

What do I miss please?

Hello again,

I’ve change the generate.php file to try to understand why it doesn’t work like this :

[code]<?php

require_once ‘gridPdfGenerator.php’;
require_once ‘tcpdf/tcpdf.php’;
require_once ‘gridPdfWrapper.php’;

$debug = true;
$error_handler = set_error_handler(“PDFErrorHandler”);
echo(‘av1
’);
echo($_POST[‘grid_xml’]);
if (get_magic_quotes_gpc()) {
$xmlString = stripslashes($_POST[‘grid_xml’]);
echo(‘if1’);
} else {
$xmlString = $POST[‘grid_xml’];
echo(‘if2’);
}
echo(‘av2
’);
$xmlString = urldecode($xmlString);
if ($debug == true) {
error_log($xmlString, 3, 'debug
’.date(“Y_m_d__H_i_s”).’.xml’);
}
echo(‘av3
’);
echo($xmlString);
$xml = simplexml_load_string($xmlString);
$pdf = new gridPdfGenerator();
$pdf->printGrid($xml);

function PDFErrorHandler ($errno, $errstr, $errfile, $errline) {
global $xmlString;
if ($errno < 1024) {
error_log($xmlString, 3, ‘error_report_’.date(“Y_m_d__H_i_s”).’.xml’);
echo $errfile." at “.$errline.” : ".$errstr;
exit(1);
}

}

?>[/code]

In result Is see that the require_once path is ok.
I see my first echo "av1
"
and nothing after… except the error :
D:\xxxxxxxx\codebase\grid-pdf-php\generate.php at 10 : Undefined index: grid_xml
(I’ve change the initial path of grid-pdf-php folder)

Thanks for your help!