I am using pdfcrowd to convert php file into pdf but it converts blank pdf. What may be the issue? Do pdfcrowd convert php file?
Code is here
<?php
require 'pdfcrowd.php';
try
{
$client = new Pdfcrowd("nabinashahi", "2ef55554fe4c2d23b52b8e080cac867g");// create an API client instance
// $pdf = $client->convertURI('http://www.google.com/');
$pdf = $client->convertFile("C:/xampp/htdocs/pdf/page.php");// convert a web page and store the generated PDF into a $pdf variable
// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: no-cache");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"google_com.pdf\"");
echo $pdf;// send the generated PDF
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}
?>