Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
PDF to Markdown guide

Keep Headings and Structure When Converting a PDF

The converter infers headings from relative font size: the largest size becomes #, the next becomes ##. Here is when that works, and what to do when a document defeats it.

Direct answer

Heading detection is based on font size, not on PDF bookmarks. The converter measures the glyph height of every line, decides which size carries most of the body text, and promotes each larger size to a heading level — the largest to #, the next to ##, down to ######. It works well on documents that set headings in a visibly larger type, and it produces nothing on documents that signal headings only with bold or colour.

Open PDF to Markdown converter

When to use this

  • You are converting a structured report, whitepaper, or manual and want a real Markdown outline.
  • Your output is one long wall of paragraphs and you want to know why.
  • You need the outline for a wiki page or a table of contents.

Steps

  1. Convert the PDF with 'Detect headings' on.
  2. Read the output and check that the # and ## levels match the document's real hierarchy.
  3. If body text was wrongly promoted, turn 'Detect headings' off and re-add headings by hand.
  4. If headings were missed, check whether the source uses bold-only headings at body size — size is the only signal available.
  5. Fix any remaining level in the editable output pane before you copy.

Example

PDF source
Report Title (20 pt)
Introduction (14 pt)
Background (12 pt)
Body copy set at 10 pt across most of the document.
Markdown output
# Report Title

## Introduction

### Background

Body copy set at 10 pt across most of the document.

Common mistakes

  • Do not expect headings from a document that styles them with bold or colour at body size; the converter reads size only.
  • Do not assume the level count matches your outline. Six distinct large sizes produce six levels, even when the document has three real ones.
  • A large pull quote or a cover-page line in big type can be promoted to a heading. Delete it in the output pane.
  • PDF bookmarks and the table of contents are not used; they are a separate structure the text layer does not expose to this tool.

FAQ

How does it decide what body text is?
It counts characters per font size and picks the size that covers the most characters. Only sizes more than eight percent larger than that become heading candidates, which stops a slightly taller line from being promoted.
Why did a caption become a heading?
Because it is set in a larger size than the body text. Size is the only signal. Remove the stray heading in the output pane, or turn detection off and add headings manually.
Can it use the PDF's bookmarks instead?
No. The converter works from the extracted text layer and its font sizes. Bookmarks are a separate outline structure that this tool does not read.

Related PDF to Markdown guides