Export to PDF not work

hello,

When i call this javascript function
scheduler.toPDF(‘lib/generate.php’);

i receive this error:
SimpleXMLElement::__construct() [simplexmlelement.–construct]: Entity: line 1: parser error : Start tag expected, ‘<’ not found

I activate de debug and attach the debug files

How can I fix this error?
debug.zip (1.28 KB)

I found the solution, in generate.php, i replace

$xml = new SimpleXMLElement($xmlString, LIBXML_NOCDATA);

by

$xml = new SimpleXMLElement(urldecode($xmlString), LIBXML_NOCDATA);