firingsquad
wrote on 2015-05-15:
here is my code:
<?php
require 'core/pdfcrowd.php';
define( 'DATETIME', date( 'Y-m-d H:i:s' ));
try
{
// create an API client instance
$client = new Pdfcrowd("firingsquad", "9b4d0d88c23bdeadac204a335338fa25");
$client->setPageLayout(Pdfcrowd::SINGLE_PAGE);
// convert a web page and store the generated PDF into a $pdf variable
$pdf = $client->convertURI(''.$_GET['url'].'');
// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: max-age=0");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"quote_".DATETIME.".pdf\"");
// send the generated PDF
echo $pdf;
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}
?>
I need to produce a pdf that is a single page not broken into separate pages