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

PHP No footer on first page

chevrolux wrote on 2018-03-25:
Hi there,
I am using PHP with the new beta API. It is all working perfectly. I just have one question I have not been able to answer through googling alone, is can I remove the footer off just the first page?

Here is the current set up I am using...
$pdfclient = new \Pdfcrowd\HtmlToPdfClient("user", "xx-api-key-xx");
$pdfclient->setPageSize('A4');
$pdfclient->setOrientation('landscape');
$pdfclient->setHeaderHeight('15mm');
$pdfclient->setFooterHeight('25mm');
$pdfclient->setFooterUrl($pdfFooter);
$pdfclient->convertUrlToFile($pdfBody, $pdfOutput);


Any help much appreciated.
support wrote on 2018-03-26:
Hi,

Yes. It can be done by the setExcludeFooterOnPages method.
$pdfclient->setExcludeFooterOnPages('1');


Please see details:
-- https://pdfcrowd.com/api/html-to-pdf-php/#set_exclude_footer_on_pages
chevrolux wrote on 2018-03-27:
Hah! Wow, clearly I didn't read the documentation properly. Thank you for your help!