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

page-break-after not working

fabianderijk wrote on 2011-10-18:
Hi guys,

I've created a html page which i export to PDF via your php API. All works fine, but the page breaks that are supposed to work, don't. Could you please help me out?

I've attached the html to this message, and also added the generated pdf.

Thanks in advance!
support wrote on 2011-10-18:

overflow:hidden does not play well with the page-break-after property. The offending rule is in screen.css:399.

The page breaks are inserted correctly when I add the following line to the internal style sheet <style> block:
.page-pdf-reports .content { overflow:visible; }
torgormack wrote on 2011-10-26:
I have just started using your API to convert html to PDF and I am unable to get page breaks to work.

I have attached my source html, output pdf and the php script i am using.

Any help greatly appreciated.
fabianderijk wrote on 2011-10-26:
The solution posted for me worked for me
support wrote on 2011-10-26:
@torgormack: Where we can find the external style sheets? They likely contain some css rule which causes the problem since the page breaks are inserted correctly without the external css.