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

setPageLayout options

firingsquad wrote on 2015-05-15:
here is my code:
require 'core/pdfcrowd.php';
define( 'DATETIME', date( 'Y-m-d H:i:s' ));
// create an API client instance
$client = new Pdfcrowd("firingsquad", "9b4d0d88c23bdeadac204a335338fa25");
// 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