# Fill-in lines & inline HTML in PDFs Markdown alone can't express everything a printed **form or court filing** needs — a signature line, a "Name: ______" blank, a two-column caption, a centred title block. Markdown Studio's PDF renderer understands a small, deliberate subset of inline HTML/CSS so those documents come out right when you **print or export to PDF**, while the source stays plain Markdown that an AI assistant can read and edit. > **Scope:** this page describes what the **PDF renderer** supports (the > Print / Export PDF preview tab). The on-screen Markdown preview may render > these snippets more plainly — judge the result in the print preview. ## Quick reference | Construct | Renders as | | --- | --- | | `text`, `text` | Underlined text | | `text` | Struck-through text | | `
` | Line break | | `` (no text) | A fill-in blank line | | `text` | A styled inline label | | `` | Redacted (invisible) text | | `
` | A block signature line | | `
` | Aligned block text | | `
` | Divs laid out side by side (a row) | | `
` | Forces a new page | ## Fill-in blanks (inline ``) A span with a **visible `border-bottom`** and no real text renders as a blank line sitting on the text baseline — the classic fill-in field: ```markdown Name: Date: ``` Details the renderer honours: - **Width** — `width` or `min-width` in `px`, `pt`, or `%` (percentages are resolved against the line width). If both are given, the larger wins. With no usable width, the blank defaults to **108 pt** (about 1.5 inches). `width:0` (or `width:0%`) deliberately collapses the span to nothing. - **Border** — the `border-bottom` shorthand and the `border-bottom-width/-style/-color` longhands are all parsed. A border with `style:none/hidden`, zero width, or a transparent colour counts as invisible (so the span is not treated as a blank). Very thin borders are drawn at a minimum of 0.6 pt so they survive printing. - **Colour** — a border with no colour of its own uses the surrounding text colour. ## Styled labels (inline `` with text) A span **with text** becomes a styled run inside the paragraph: ```markdown Status: OVERDUE ``` Supported properties: `color`, `font-weight` (`bold` or numeric ≥ 600), `font-style: italic`, `font-size`, and `text-decoration: underline` / `line-through` (combined with any surrounding decoration). **Redaction:** `color: transparent` hides the text while keeping its space — on a span itself or inherited from a wrapping span. Combined with a visible `border-bottom` it draws the blank without the text. Spans nest (inner spans inherit the outer style), uppercase `` works, HTML entities in prose are decoded (`&` → `&`, ` ` → space), and stray, unclosed, or self-closing span tags are stripped rather than leaking into the output. ## Block layout (`
`) A `
` on its own line(s) is a block-level element: - **Signature line** — an empty div with a visible `border-bottom` draws a standalone rule: ```markdown
Respondent's signature
``` - **Alignment** — `text-align: left | center | right | justify` on a div with text aligns it across the page (e.g. a centred court title block). - **Rows** — `display:flex` on a wrapper div lays its child divs out side by side; `flex-direction: column` stacks them instead, and `justify-content` maps to the row's alignment. Child widths can be fixed lengths or percentages (percentages become proportional flex). This is how a two-column court caption (party names left, case number right) is built: ```markdown
JANE DOE,
Petitioner
Case No. 12-3456
``` Wrapper divs nest: a div containing more divs recurses into a column or row, and children inside a row shrink to fit rather than overflowing. Inner `` tags and HTML entities are handled. ## Page breaks A **bare** `
` (empty or self-closing) or `
` carrying a page-break directive forces a new page — the classic use is starting the *Certificate of Service* on its own page: ```markdown
#### CERTIFICATE OF SERVICE ``` Details: - Accepted directives: `page-break-before: always`, `page-break-after: always`, and the CSS-3 fragmentation spellings `break-before: page` / `break-after: page`. A trailing `!important` is tolerated. - The element itself prints nothing — unless it is *also* visible in its own right (e.g. a signature line with a `border-bottom` plus the directive), in which case it breaks on the side the directive names and still renders. - Only **bare, top-level** elements break. A content-carrying div never becomes a page break, and a break div nested *inside* a wrapper div is ignored (the wrapper renders normally). - A plain Markdown `---` divider is unaffected — it stays a horizontal rule. ## Legal-mode pagination With a **legal-mode** profile (e.g. the built-in *Court Filing*), body paragraphs and list items **flow across page boundaries**: a paragraph that doesn't fit the remaining space splits at a line and continues on the next page, so every page fills top to bottom the way a court filing must. Legal mode also sets body text — captions, list markers and plain `
`s included — at a uniform **12pt** (Markdown headings keep their own sizes; `#####` renders a 12pt bold title) and keeps one continuous double-spaced rhythm across paragraph breaks. Headings, caption rows, signature lines, quotes, tables and images never split. ## Limitations - **Spans wrapping Markdown syntax.** When a span wraps Markdown emphasis or a link (e.g. `**bold**`), the Markdown parser splits the tags away from the inner element. The tags never leak and the emphasis still renders, but the span's own colour/weight is not applied to that inner element. Style the plain text directly instead. - **Entities in code.** HTML entities are decoded in prose but left verbatim inside code spans and code blocks (by design). - **Everything else is text.** HTML tags outside this subset are not interpreted by the PDF renderer. ## See also - **[Print & branding profiles](print-profiles.md)** — fonts, colours, headers/footers, watermarks, and the legal / manuscript layout options (double spacing, justification, first-line indent, centred headings). - **[AI profile authoring](ai-profile-authoring.md)** — have an AI generate an importable print profile from a plain-English description.