Word document layout

Keep a Word heading with its first paragraph before exporting the final PDF

Stop a Word heading from being stranded at the bottom of a page by applying Keep with next in the DOCX, exporting a fresh PDF, and checking the affected page boundaries.

7 min read 1468 words

When a Word heading is stranded at the bottom of a page, apply Keep with next to that heading paragraph or its heading style, then export a new PDF. Do not push the heading down with blank lines: later edits will move those lines and recreate the problem elsewhere.

Confirm that the heading is separated by an automatic page break

Keep with next is the right control when a heading and the paragraph immediately after it are split by normal pagination. First save a working copy of the DOCX, turn on formatting marks, and check that a manual page break, section break, empty paragraph, or oversized object is not creating the boundary.

For example, a policy document may place “Incident reporting” as the last line on page 4 while its opening paragraph begins on page 5. The document looked correct before a late paragraph was added near the beginning, so somebody inserted two blank paragraphs above the heading. Another edit then moved the heading to page 5 and left an unexplained gap on page 4. Removing the blank paragraphs and applying a paragraph rule makes the intent travel with the heading.

Do not use Keep lines together as a substitute. That setting keeps the lines within one paragraph on the same page. Keep with next links the selected heading or paragraph to the paragraph that follows it. A manual Page break before rule is different again: it always starts the selected paragraph on a new page, even when the heading and its text could fit together on the current page.

Apply Keep with next to one heading in desktop Word

For a one-off exception, change only the affected heading paragraph. Right-click in the heading, choose Paragraph, open Line and Page Breaks, select Keep with next, and confirm the change. Microsoft's current Keep text together instructions document this control for Word for Microsoft 365, Word 2024, Word 2021, Word 2019, and Word 2016.

Leave the first body paragraph unlinked unless there is a separate reason to keep it with another paragraph. Applying the setting to a chain of several paragraphs can force a large block onto the next page and create a much bigger gap. The goal is narrow: keep the heading with enough opening text to prevent a stranded label.

After applying the rule, add or remove a few words in a working section above it. The heading and its first paragraph should move together as Word repaginates. If they still separate, confirm that the cursor was in the heading paragraph rather than the first body paragraph and that a manual break is not sitting between them.

Put the rule in the heading style when the document uses it consistently

A style change is better when every heading at the same level should follow the same pagination rule. In a saved working copy, go to Home > Styles, right-click the actual style used by the heading, and choose Modify. Use the paragraph formatting controls in that dialog to set Keep with next, then apply the change only to the current document unless its approved template should also change.

Microsoft's current style customization page covers desktop Word for Microsoft 365, Word 2024, Word 2021, Word 2019, and Word 2016. It explains that modifying a style updates text that uses that style. That is useful only when the document uses real Heading styles consistently; bold, enlarged body text that merely looks like a heading will not inherit the rule.

Review every instance of the modified style, not just the original failure. A Heading 2 followed by a large table, photograph, or long unbreakable paragraph may move farther than expected. If one special heading needs different behavior, direct paragraph formatting can be safer than changing the shared style.

The verified paths here are desktop Word paths. A localized build can use translated labels, and Word for the web or a managed installation may not expose the same style-editing controls. If the paragraph or style settings are unavailable, open an approved copy in a desktop edition named by the source or use that edition's Microsoft Help; do not invent a menu based on another interface.

Export a fresh PDF from the corrected DOCX

Save the working DOCX and create a PDF with a new, unmistakable filename. Microsoft's current Office desktop PDF instructions use File > Save As or Save a copy, choose PDF, and provide additional options before saving.

That PDF support page currently names Word for Microsoft 365, Word 2021, Word 2019, and Word 2016. Word 2024 appears on the Keep with next and style pages but not on this PDF page's current Word applicability list. If a Word 2024, Mac, or web interface shows different export labels, use its available export route and inspect the result instead of claiming that one desktop path is universal.

Open the new PDF independently. Check the heading, the complete first paragraph, the preceding page, and the next heading after the changed one. A larger blank area at the bottom of a page can be the correct consequence when the combined heading and paragraph no longer fit; it should not be filled with unrelated text or hidden by manually shrinking margins.

Use page images only for visual acceptance

The PDF to Image converter can render the affected pages as PNG or JPG for a side-by-side visual check. Select a strict custom range around the boundary, such as 4-5, and begin with PNG at 150 DPI. The tool also offers 72 and 300 DPI; multiple selected pages can be downloaded individually or together as a ZIP.

This review aid cannot open or edit DOCX, apply Keep with next, modify a Word style, or change the source PDF. It rasterizes pages, so the images cannot prove that PDF text remains selectable, links still work, bookmarks point to the correct sections, or accessibility tags survived export. Return to the actual PDF for those checks.

PDF Page Manager is not a repair for this problem. Reordering or omitting whole PDF pages cannot move a heading within a page or correct the reusable Word source. When the DOCX is available, fix its paragraph pagination and export again.

Check every boundary affected by the style change

A successful result keeps each intended heading with its opening paragraph without creating accidental forced pages. Review the document at the same page size and export settings that the recipient will use.

  • The problem heading and at least the first line of its following paragraph are on the same page.
  • No manual break or empty paragraph was added just to hold the layout in place.
  • Other headings using the modified style still have sensible page boundaries.
  • Tables, images, callouts, footnotes, headers, and page numbers near moved content remain complete.
  • The actual PDF has the expected page count, selectable text, working links, and correct first and last pages.

Keep the earlier PDF until the new one passes. For a signed, accessible, regulated, or records-controlled document, follow the owner's required review process as well; a clean page image is useful visual evidence, not a complete approval.

Common questions

Why did Keep with next create a large gap at the bottom of the page?

The heading and following paragraph may not fit in the remaining space, so Word moves them together. Check whether that pairing is required before changing margins or adding unrelated content to hide the gap.

Should I select the heading and the first paragraph together?

Apply Keep with next to the heading paragraph. Applying it to multiple consecutive paragraphs can create a chain that moves more content than intended.

Is Keep lines together the same setting?

No. Keep lines together prevents one paragraph from splitting across pages; Keep with next connects the selected paragraph to the paragraph after it.

Does the exact path apply to Word for the web or Mac?

The cited pagination and style scope covers the named desktop Word releases, while interfaces can differ on web, Mac, localized, and managed installations. Use the controls available in the installed edition and verify the exported PDF.

Can ToolboxHub fix the Word heading or DOCX for me?

No. PDF to Image creates separate raster images from a PDF for visual review. It does not open, edit, save, or repair a DOCX and cannot change Word paragraph or style settings.

Are the PNG page images enough to approve the final PDF?

No. They can show where headings and paragraphs appear, but they cannot verify selectable text, links, bookmarks, forms, tags, or accessibility. Inspect the actual PDF after the image check.