We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Page Break in CSS not in PDF

I am testing Aspose.HTML 19.2 with a client document that used the following to create page breaks in is HTML.

<STYLE> P.page { page-break-after: always } .smalltable, .smalltable TD, .smalltable TH {font-family:ariel; font-size:9pt; color:black;}</STYLE>

When I convert the client’s document with Aspose, the page breaks are not listened to. Is there a setting I need to set to have these take effect? Are page breaks in the HTML from CSS style supported when rendering HTML to PDF?



Thank you for contacting support.

Please note that you can add forced page breaks with CSS rules: “page-break-before: always; page-break-after: always;”. However, if you are noticing problems then please share source and generated files along with narrowed down code snippet so that we may investigate further to help you out.


I can’t share the document as it is a client’s. If I find another sample that I can share I will pass it along.


Please take your time and get back to us once the data along with narrowed down code snippet is available. Moreover, forum attachments are accessible to thread owner and Aspose staff, and are used for testing purposes only.