Snippets
- Learn phpdocx in 5 minutes
- Tutorial
- API quick guide
- HTML to Word
- HTML Extended
- Conversion plugin
- Word to HTML
- DOCXPath
- Bulk processing
- DOCXCustomizer
- Digital signature
- Cryptophpdocx
- Right to left languages
- phpdocx CLI command
- Tracking
- Artificial Intelligence
- Blockchain for documents
- JavaScript API
- Compiled mode
Prevent page break in paragraphs using HTML
page-break-inside and page-break-after styles can be applied to avoid page breaks in paragraph contents when importing HTML. The following sample illustrates both styles in a paragraph that contains a paragraph and a list:
Internal or external CSS can be used to apply the same styles:
It is also possible to use custom styles.