This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Write pdf directly to the server

brsystems wrote on 2013-11-16:
I'm trying to create the pdf file directly into the directory server , but I have done several attempts and no runs .

I tried to copy and paste the code, but the forum database has not accepted the php tags

So I am sending the attached file.

I just hid API code , for safety reasons

Could take a look at the code and see where is the error?
support wrote on 2013-11-18:
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.