Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
A hard page break forces the following content to begin on the next page. In a DOCX file, use Word’s Insert → Page Break command or python-docx’s document.add_page_break(). In a PDF generated with ReportLab, add a PageBreak flowable to the Platypus story. Choose the method that matches your file type and layout goal; a page break is different from a section break or from settings that keep related paragraphs together.
Choose the right kind of break
“Page break” can mean several different operations. A hard page break is an explicit pagination command: everything after it starts on the next page. A line break moves text to a new line, a column break moves it to the next newspaper-style column, and a section break starts a new structural section with potentially different margins, headers, footers, orientation, or numbering. Use a section break when the document’s formatting needs to change; do not substitute repeated hard breaks.
| Goal | Best method | Why |
|---|---|---|
| One deliberate new page | Hard page break | Predictable separation of two content blocks |
| Always start a chapter heading on a new page | page_break_before or a Word paragraph style |
Applies consistently whenever that paragraph occurs |
| Keep a heading with its first paragraph | keep_with_next |
Lets the renderer paginate naturally without blank pages |
| Prevent one paragraph from splitting | keep_together |
Controls a paragraph’s internal pagination |
| Change headers, margins, or orientation | Section break | Creates a new document section rather than only moving text |
Add a page break in Microsoft Word
- Place the cursor where the new page should begin.
- Choose Insert → Page Break. Word inserts a manual break and moves subsequent content to the next page.
- For a keyboard shortcut on Windows, press Ctrl+Enter. On macOS, use Word’s Page Break command or the shortcut shown by your installed Word version.
- To inspect or remove breaks, enable Home → ¶ Show/Hide, select the “Page Break” marker, and press Delete or Backspace.
Use a manual break for a one-off transition such as a cover page, appendix, or new chapter. If a heading should begin a new page every time, edit its paragraph style instead: open the style’s paragraph-format controls and enable the equivalent of “Page break before.” This survives edits better than inserting a break above every heading.
Insert a page break with python-docx
python-docx writes Office Open XML DOCX files. Install it with pip install python-docx, then select the API that matches the scope of your break.
#1 Best Overall
Standalone hard break
Document.add_page_break() creates a new paragraph containing only a page break. It is the clearest option between two blocks of content.
from docx import Document
document = Document()
document.add_paragraph("Content on page one.")
document.add_page_break()
document.add_paragraph("Content on page two.")
document.save("output.docx")
The saved file remains editable. Word-compatible renderers decide the exact page geometry from the document’s paper size, margins, fonts, and other settings, but the explicit break guarantees that the following paragraph cannot remain on the preceding page.
Break inside a paragraph run
Use a run-level break when text before and after the break belongs to one paragraph object, for example a generated label that must continue after a forced page transition.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →from docx import Document
from docx.enum.text import WD_BREAK
document = Document()
paragraph = document.add_paragraph("Before")
run = paragraph.add_run()
run.add_break(WD_BREAK.PAGE)
paragraph.add_run("After the break")
document.save("output.docx")
Always pass WD_BREAK.PAGE. Calling run.add_break() without an argument creates a line break, not a page break.
Start selected paragraphs on a new page
Set paragraph.paragraph_format.page_break_before = True when a paragraph—usually a chapter or report heading—must begin on a fresh page wherever it appears.
from docx import Document
document = Document()
paragraph = document.add_paragraph("Chapter heading")
paragraph.paragraph_format.page_break_before = True
document.add_paragraph("Chapter text")
document.save("chapters.docx")
This property is preferable to adding a separate empty paragraph with a break because the pagination rule travels with the heading.
Control DOCX pagination without forcing pages
Hard breaks can create excessive whitespace when content changes. python-docx exposes Word’s paragraph pagination properties for cases where the renderer should find the best page boundary.
keep_together: asks Word to keep all lines of a paragraph on one page when possible.keep_with_next: keeps a heading with the paragraph or list that follows it, preventing an orphaned heading at the bottom of a page.widow_control: avoids leaving a single first or last line of a paragraph stranded on another page.
from docx import Document
document = Document()
heading = document.add_paragraph("Installation")
heading.paragraph_format.keep_with_next = True
text = document.add_paragraph("Install the package, configure the input, and run the generator.")
text.paragraph_format.keep_together = True
text.paragraph_format.widow_control = True
document.save("controlled.docx")
These settings are layout preferences, not absolute guarantees. A paragraph taller than a page cannot be kept intact, and Word-compatible applications may make slightly different pagination decisions.
Rank #3
Force a new page in a generated PDF with ReportLab
ReportLab’s Platypus system builds a PDF from flowables. Add PageBreak() to the story at the exact point where the next flowable must start on a new page.
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import SimpleDocTemplate, Paragraph, PageBreak
styles = getSampleStyleSheet()
story = [
Paragraph("Page one", styles["BodyText"]),
PageBreak(),
Paragraph("Page two", styles["BodyText"]),
]
doc = SimpleDocTemplate("output.pdf")
doc.build(story)
PageBreak is handled by the document template during build(). It does not add a visible character; it ends the current page and places the next flowable at the top of a new one. For chapter starts, insert the flowable before the chapter heading. For a change in margins or page size, use a suitable page-template or document-layout design rather than stacking page breaks.
DOCX versus PDF: what changes
A DOCX stores editable content and layout instructions. Pagination is recalculated when Word or another compatible renderer opens the file, so changing fonts, printer metrics, margins, or paper size can move natural page boundaries around your hard breaks. The break itself remains.
Free tools Windows power users keep installed
One-click scans. No signup required.
A ReportLab PDF is already paginated when generated. Its pages, coordinates, fonts, and flowables are resolved during the build. A later PDF viewer does not reflow the text, although printing with scaling can change the physical output. If you need an editable document, generate DOCX; if you need fixed visual pagination for distribution or archival output, generate PDF.
Rank #4
Common failures and fixes
The “break” only creates a new line
Cause: run.add_break() defaults to a line break. Fix: import WD_BREAK and call run.add_break(WD_BREAK.PAGE).
A heading is stranded at the bottom of a page
Cause: the heading and following paragraph are independent. Fix: set the heading’s keep_with_next property or configure the heading style’s “keep with next” option in Word.
Unexpected blank pages appear
Cause: multiple manual breaks, a break before content that already flowed to a new page, or a paragraph whose height exceeds the available space. Fix: show formatting marks in Word, remove duplicate breaks, and replace repeated hard breaks with page_break_before or keep properties.
Recommended Free Tools
ReportLab content starts too low or overflows
Cause: the story contains a large flowable, oversized spacing, or page margins that leave insufficient frame height. Fix: inspect styles and margins, split long content into smaller flowables, and place PageBreak() between logical groups rather than inside an unbreakable custom flowable.
Best Value
The DOCX looks different on another machine
Cause: DOCX pagination depends on the renderer, installed fonts, paper size, and margins. Fix: set explicit section dimensions, use available fonts, and validate the final file in the Word-compatible application used by your recipients. Convert to PDF when fixed pagination is required.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Testing a generated document
- Open the DOCX and enable formatting marks; confirm each intended manual break appears once.
- Resize the window or open the file in the target Word-compatible renderer to check that headings, tables, and images do not create accidental blank pages.
- For PDFs, inspect page count and the first flowable on every boundary with your PDF viewer; print a sample if physical margins matter.
- Automate regression checks by generating the same input repeatedly and comparing page count, file validity, and key text locations. Treat visual comparison as renderer-specific.
Or skip the browser setup
If your workflow also needs website screenshots for reports, ScreenshotNeo returns a PNG, JPEG, WebP, or PDF from one GET request. It accepts cookie and consent banners as a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server gives Claude, Cursor, and other MCP clients take_screenshot, get_page_info, and capture_pdf tools.
See the ScreenshotNeo API documentation for all options, including full-page and element capture, device and retina settings, PDF paper size and margins, custom CSS and JavaScript, waits, request blocking, authentication headers, cookies, geolocation, caching, signed links, asynchronous webhooks, bulk capture, and usage reporting.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = Buffer.from(await res.arrayBuffer());
require('fs').writeFileSync('shot.webp', data);
The Free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account to get started.
Frequently Asked Questions
Can I use a page break to change margins or orientation?
No. Use a section break in DOCX or a different ReportLab page template; a page break only starts the next page.
Why does a DOCX page count change after editing?
Word recalculates natural pagination from content, fonts, margins, and renderer settings. Explicit breaks remain, but surrounding content can move.
Is ReportLab PageBreak visible in the PDF text?
No. It is a Platypus flowable that ends the current page during document construction.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

