Hi,
Thank's for this service.
I want to generate a PDF in landscape orientation. I made < section > in my HTML as a "page" with specific dimensions 1280*890px.
I can have multiple pages.
I want an A4 output format to print, then I configured PDFCrowd:
try {
// create an API client instance
$client = new Pdfcrowd('...', '...');
// convert a web page and store the generated PDF into a $pdf variable
$client->setPageWidth('297mm');
$client->setPageHeight('210mm');
$pdf = $client->convertURI('http//domain.com');
// set HTTP response headers
header('Content-Type: application/pdf');
header('Cache-Control: no-cache');
header('Accept-Ranges: none');
header('Content-Disposition: attachment; filename=\'file.pdf\'');
// send the generated PDF
$response = $pdf;
} catch(PdfcrowdException $why) {
$response = 'Pdfcrowd Error: ' . $why;
}
return $response;
I didn't find why I have an extra empty page in my PDF. I'd like to know what should I do to resolve that.
Bests!
EDIT: Fixed, got an extra margin in the footer.