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

Cant save pdf file in any folder/directory after generate PDF

latheesh wrote on 2015-06-02:
Hi,

Cant save pdf file in any folder/directory after generate PDF, i have used this code.


<?php
ob_start();


require 'pdfcrowd.php';

try {


$client = new Pdfcrowd("***", "***");



$fd = fopen("http://kbim.reviews/acp/certificate/images/out.pdf",'wb');

$pdf = $client->convertURI('http://www.kbim.reviews/acp/certificate/11.html',$fd);
fclose($fd);



$client->setPageWidth("199.760416667mm");
$client->setPageHeight("152.8125mm");






header("Content-Type: application/pdf");
header("Cache-Control: no-cache");
header("Accept-Ranges: none");
header("Content-Disposition: inline; filename=\"kbim_certificate.pdf\"");

echo $pdf;

}
catch(PdfcrowdException $why) {
echo "Can't create PDF: ".$why."\n";
}

?>
latheesh wrote on 2015-06-02:
i am expecting reply from support desk
support wrote on 2015-06-02:
Hello,

The argument passed to fopen should be a local directory, not a URL.