Hello,
Replace the code in the try block with the following:
$client = new Pdfcrowd("***", "***");
$out_file = fopen("/home/brsystems/public_html/boleto/document.pdf", "wb");
$client->convertURI('http://www.brsystems.com.br/boleto/index.php', $out_file);
fclose($out_file);
Hope this helps.