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

Page Break

mohannad wrote on 2011-11-08:
Is there a way using the APIs to tell pdfcrowd that the page has ended and start a new page?

Also when calling the setPageLayout() function from the PHP library, it results in:

Uncaught exception 'PdfcrowdException' with message 'Invalid parameter value - page_layout'
support wrote on 2011-11-08:
>> Is there a way using the APIs to tell pdfcrowd that the page has ended and start a new page?

You can insert a page break using the page-break-after or page-break-before property:
Page 1
<div style="page-break-before:always"></div>
Page 2

To test it out just copy this code to http://pdfcrowd.com/#convert_by_input and convert it to PDF.


[color=#777777]>> Also when calling the setPageLayout() function from the PHP library, it results in:
Uncaught exception 'PdfcrowdException' with message 'Invalid parameter value - page_layout'


Here is a setPageLayout() usage example:
$client->setPageLayout(Pdfcrowd::CONTINUOUS);

The following values are supported:
Pdfcrowd::SINGLE_PAGE
Pdfcrowd::CONTINUOUS
Pdfcrowd::CONTINUOUS_FACING
benjam wrote on 2013-01-15:
Hi,
I've tested various methods to get pdfcrowd to make a page break. With no success so far.
Have a look at resume.benajmintreplin.com
Page break works in printer dialog though but not with pdfcrowd.

I'm using the API. It works on your web interface but not on the API.

Many thanks.