Skip to content

PDF Style Reference

This is a technical reference for PDF Export Styles in Atlas. Unlike HTML and ePub styles, PDF styles are not CSS — they're a structured JSON configuration that defines page geometry, typography, and headers/footers from scratch. This guide walks every field, the page-size and margin presets, the header/footer resolution rules, and a case study of the built-in Novel style.

If you're new to Custom Export Styles, start with Custom Export Styles. For HTML and ePub authoring, see HTML/ePub Style Reference.

Editing PDF Styles

Atlas does not currently include a graphical editor for PDF styles. To create or modify one, you work directly with the JSON. The recommended workflow:

  1. Duplicate a built-in style (for example, Default or Novel) from the Export Styles screen so you have a writable copy.
  2. Share the duplicate from its context menu — Atlas exports a .pdfstyle file (a package, not a flat file).
  3. On macOS, right-click the .pdfstyle and choose Show Package Contents. Inside you'll find a single style.json file. On iOS/iPadOS, open the package in Files and drill into it the same way.
  4. Open style.json in any text editor — TextEdit, BBEdit, Visual Studio Code, Sublime Text, Nova, or anything else that handles JSON. VS Code's JSON support gives you bracket matching, schema validation as you type, and color previews on hex strings, which makes longer edits much easier.
  5. Save the file, then re-import the .pdfstyle package into Atlas from the Export Styles screen. The updated style appears in the grid, and iCloud syncs it to your other devices.

Tip

Every field in this document maps 1:1 to a key in style.json, so you can copy the JSON snippets below directly into your style. If a key is missing from your file, Atlas falls back to a sensible default — you only need to include the fields you actually want to change from the duplicated baseline.

Style Anatomy

Every PDF style is made up of these sections:

Section What it controls
Identity Name, author, description shown in the picker
Page Layout Page dimensions, margins, two-sided / mirrored layout
Body Typography Body font, size, color, line spacing, alignment, paragraph spacing, first-line indent
Heading Typography Heading font + per-level (H1–H6) sizes and a shared color
Per-Heading Overrides Optional H1–H6 alignment, weight, slant, top/bottom margins, page-break-before
Code Typography Monospace family, size, background color
Blockquote Indent, text color, border color, slant, optional top/bottom margins
Links Color, underline on/off
Divider Horizontal-rule color
Header / Footer Areas Optional top and bottom areas with content sources, alignment, font size, and per-page-side overrides

Page Layout

Page Dimensions

PDF dimensions are stored in points (1 inch = 72 points) under the pageDimensions key as { "width": …, "height": … }. You can use a preset's exact values or set a custom size.

"pageDimensions": { "width": 612, "height": 792 }

Built-in presets (14 total):

Preset Display Name Notes
usLetter US Letter 8.5 × 11 in (612 × 792 pt) — default
usLegal US Legal 8.5 × 14 in (612 × 1008 pt)
tabloid Tabloid 11 × 17 in (792 × 1224 pt)
tabloidOversize Tabloid Oversize 12 × 18 in (864 × 1296 pt)
a3 A3 ISO 297 × 420 mm
a4 A4 ISO 210 × 297 mm
a5 A5 ISO 148 × 210 mm
b5 B5 ISO 176 × 250 mm
jisB5 JIS B5 Japanese Industrial Standard B5
roc16K ROC 16K Taiwanese 16K
superBA3 Super B/A3 13 × 19 in (936 × 1368 pt)
envelope10 Envelope #10 US business envelope
envelopeChoukei3 Envelope Choukei 3 Japanese long envelope
envelopeDL Envelope DL Standard DL envelope

For custom trim sizes — for example a 5×8" trade paperback — set the dimensions directly:

"pageDimensions": { "width": 360, "height": 576 }

Margins

Margins are stored as four point values under margins:

"margins": { "top": 72, "bottom": 72, "left": 72, "right": 72 }

Built-in presets:

Preset Top / Bottom Left / Right
normal 72 pt (1 in) 72 pt (1 in)
narrow 54 pt (0.75 in) 54 pt (0.75 in)
wide 72 pt (1 in) 108 pt (1.5 in)

The export sheet also exposes a Style Default option at the user level that simply re-uses the margins baked into the style itself, but the JSON always carries an explicit margins block.

Two-Sided Layout

Setting "twoSided": true turns the PDF into a book-style document with mirrored margins. When two-sided is on:

  • margins.left is treated as the inner (binding-side) margin.
  • margins.right is treated as the outer (edge-side) margin.
  • Recto (right-hand, odd-numbered) pages place the inner margin on the left.
  • Verso (left-hand, even-numbered) pages mirror — the inner margin sits on the right.
  • The content width never changes; only the horizontal origin of the text shifts.

Two-sided also unlocks the per-side header/footer overrides described below.

Colors

Every color field in style.json is a small object with a hex key:

"bodyColor": { "hex": "#1A1A1A" }

The hex string accepts 6-digit (#RRGGBB) or 8-digit (#RRGGBBAA) values, with or without the leading #.

Body Typography

Field Default Notes
bodyFontFamily "Helvetica" Any installed font family.
bodyFontSize 12 Points.
bodyLineSpacing 1.5 Multiplier on font size. 1.43 ≈ tight book; 1.75 ≈ airy.
bodyColor "#333333" Hex color (wrapped in { "hex": "…" }).
bodyAlignment "left" "left", "center", "right", or "justified".
paragraphSpacing 8 Points of vertical space between paragraphs. Set to 0 for indented book style.
bodyFirstLineIndent 0 Points. Use with paragraphSpacing: 0 for traditional novel typography.
"bodyFontFamily": "Georgia",
"bodyFontSize": 12,
"bodyLineSpacing": 1.6,
"bodyColor": { "hex": "#2A2A2A" },
"bodyAlignment": "justified",
"paragraphSpacing": 4,
"bodyFirstLineIndent": 0

Choosing a Paragraph Style

Two patterns dominate:

  • Web/report styleparagraphSpacing: 8–14, bodyFirstLineIndent: 0. Paragraphs are separated by vertical space.
  • Print/book styleparagraphSpacing: 0, bodyFirstLineIndent: 18–24. Paragraphs are separated by an indented first line, with no vertical gap.

Mixing the two looks busy — pick one and commit.

Headings

Sizes and Colors

Field Default Notes
headingFontFamily "Helvetica" Shared across H1–H6.
heading1Size 28
heading2Size 22
heading3Size 18
heading4Size 16
heading5Size 14
heading6Size 12
headingColor "#1A1A1A" Shared across H1–H6.

By default headings are bold, left-aligned, with generic vertical spacing.

"headingFontFamily": "Palatino",
"heading1Size": 26,
"heading2Size": 20,
"heading3Size": 16,
"heading4Size": 14,
"heading5Size": 12,
"heading6Size": 11,
"headingColor": { "hex": "#1C1C1C" }

Per-Heading Overrides

Each level (heading1Style through heading6Style) can carry an optional override block with these fields. Any field left out (or set to null) falls through to the default behavior.

Field Type Effect
alignment "left" / "center" / "right" / "justified" Override alignment for this level only.
marginTop Points Vertical space above the heading. Use a large value (e.g. 122) to drop chapter openings down the page.
marginBottom Points Vertical space below the heading.
fontWeight "normal" / "bold" Override default boldness. Set "normal" for understated headings.
fontSlant "normal" / "italic" Italic chapter labels, for example.
pageBreakBefore true / false When true, the heading always starts a new page. Use this on H1 to force chapter breaks.

This is where most of the personality of a PDF style lives. The default styles barely use these; the Novel style uses them aggressively (see the case study below).

"heading1Style": {
    "alignment": "center",
    "marginTop": 122,
    "marginBottom": 25,
    "fontWeight": "bold",
    "pageBreakBefore": true
}

To leave a level alone, simply omit its headingNStyle key from the JSON.

Code

Field Default Notes
codeFontFamily "Menlo" Monospace family.
codeFontSize 10
codeBackgroundColor "#F5F5F5" Background fill behind both inline code and fenced pre code blocks.
"codeFontFamily": "Menlo",
"codeFontSize": 9,
"codeBackgroundColor": { "hex": "#F5F2E8" }

Blockquotes

Field Default Notes
blockquoteIndent 24 Points of left indent.
blockquoteColor "#666666" Text color (often a softer gray).
blockquoteBorderColor "#DDDDDD" The vertical rule on the leading edge.
blockquoteFontSlant "normal" Set to "italic" for an editorial feel.
blockquoteMarginTop null Optional override; defaults follow the body.
blockquoteMarginBottom null Optional override.
"blockquoteIndent": 36,
"blockquoteColor": { "hex": "#333333" },
"blockquoteBorderColor": { "hex": "#DDDDDD" },
"blockquoteFontSlant": "italic"
Field Default Notes
linkColor "#0366D6" A standard link blue.
linkUnderline true Set false for fiction or print where links are inert.
"linkColor": { "hex": "#1A1A1A" },
"linkUnderline": false

Divider

Field Default Notes
dividerColor "#E0E0E0" The color of horizontal-rule lines (--- in markdown).
"dividerColor": { "hex": "#E0E0E0" }

Headers and Footers

Headers and footers are areas. A style can define a headerArea, a footerArea, both, or neither. Omit a key (or set it to null) to draw nothing in that area at all.

Area Fields

Field Type Notes
defaultContent content source Drawn on every page that doesn't match a more specific override.
firstPageContent content source or omitted Override for the first page of the document. Use a none-typed source to explicitly blank it.
leftPageContent content source or omitted Override for verso (even) pages. Only honored when the style is two-sided.
rightPageContent content source or omitted Override for recto (odd) pages. Only honored when the style is two-sided.
alignment "left" / "center" / "right" / "justified" Horizontal alignment within the content width.
fontSize Points Font size used for the area's text.

Resolution Order

When the renderer draws a page it picks one content source using this order:

  1. If this is the first page of the document and firstPageContent is present, use it.
  2. Otherwise, if the style is two-sided and the page is recto, use rightPageContent if present; if verso, use leftPageContent if present.
  3. Otherwise, use defaultContent.

There's an important distinction between omitting a key and explicitly setting it to a none-typed source:

  • Key omitted (or null) — "no override at this level, fall through to the next priority."
  • { "type": "none" } — "explicitly draw nothing here." Use this on firstPageContent to suppress a running header on chapter-opening pages, for example.

Content Sources

A content source is a small object with a type and (sometimes) a value:

Type JSON What it draws
None { "type": "none" } Nothing — the area is blank for this variant.
Literal { "type": "literal", "value": "…" } A fixed string. Supports two tokens: %page% (current page number) and %total% (total page count).
Page number { "type": "pageNumber" } The current page number, plain digits.
Running heading { "type": "runningHeading", "value": 1 } The text of the most recent heading at the given level, as of the start of this page. Use level 1 for chapter titles.

Common Recipes

Centered page number in the footer:

"footerArea": {
    "defaultContent": { "type": "pageNumber" },
    "alignment": "center",
    "fontSize": 9
}

Decorative page number — — 12 —:

"footerArea": {
    "defaultContent": { "type": "literal", "value": "— %page% —" },
    "alignment": "center",
    "fontSize": 9
}

"Page X of Y" footer, right-aligned:

"footerArea": {
    "defaultContent": { "type": "literal", "value": "Page %page% of %total%" },
    "alignment": "right",
    "fontSize": 9
}

Running chapter title on right pages, blank on the first page of each chapter:

"headerArea": {
    "defaultContent": { "type": "none" },
    "firstPageContent": { "type": "none" },
    "rightPageContent": { "type": "runningHeading", "value": 1 },
    "alignment": "center",
    "fontSize": 9
}

Section title on the left, page number on the right (two-sided):

"headerArea": {
    "defaultContent": { "type": "none" },
    "leftPageContent": { "type": "runningHeading", "value": 2 },
    "rightPageContent": { "type": "pageNumber" },
    "alignment": "center",
    "fontSize": 9
}

Manuscript-style header — author name and title in the top-left of every page:

"headerArea": {
    "defaultContent": { "type": "literal", "value": "Smith / The Long Road" },
    "alignment": "left",
    "fontSize": 10
}

Different headers on left and right pages with a centered chapter title up top:

"headerArea": {
    "defaultContent": { "type": "runningHeading", "value": 1 },
    "leftPageContent": { "type": "literal", "value": "The Long Road" },
    "rightPageContent": { "type": "runningHeading", "value": 1 },
    "firstPageContent": { "type": "none" },
    "alignment": "center",
    "fontSize": 9
}

Footer with the document title on the left and page count on the right:

"footerArea": {
    "defaultContent": { "type": "literal", "value": "The Long Road — %page% / %total%" },
    "alignment": "center",
    "fontSize": 9
}

Tips and Tricks for PDF Book Formatting

1. Reserve H1 for Chapters

Atlas's running-heading source pulls from heading levels — runningHeading(level: 1) returns the most recent H1. If you sprinkle H1 throughout a chapter for "big section markers," your running header will flicker. Use H1 only for chapter starts and lean on H2–H6 for everything inside.

2. Force Chapter Breaks with pageBreakBefore

Set heading1Style.pageBreakBefore = true and every chapter starts on a fresh page. Combine with a generous marginTop (80–130 pt) to drop the chapter heading well below the top of the page.

3. Make Chapter Openings Headerless

On the first page of a chapter you usually want no running header — only the dramatic chapter title. Set headerArea.firstPageContent = .none. Note this is .none explicitly, not nil, otherwise the renderer will fall through to defaultContent.

4. Mirror Your Margins on Two-Sided Output

If you're producing a print-ready PDF, set twoSided: true and make margins.left (the inner / binding margin) larger than margins.right (the outer edge). A common starting point for a 5×8 trade paperback: top: 65, bottom: 54, left: 61, right: 36.

5. Use Indentation, Not Spacing, in Books

For long-form fiction, set paragraphSpacing: 0 and bodyFirstLineIndent: 18–24. Vertical gaps look like web copy; first-line indents look like a book.

6. Tighten Line Spacing Carefully

Print books are typically 1.4×–1.5×. Anything below 1.3× looks cramped; anything above 1.7× looks like a draft. The Modern style uses 1.75× deliberately for a report-y feel; the Novel style uses ~1.43× for that printed-page density.

Set linkUnderline: false and linkColor: #1A1A1A for fiction or any print-bound document. Links can't be clicked on paper, and a blue underline pulls the eye for no reason.

8. Match Code and Body to the Page Tone

A Georgia/Palatino body with bright #F5F5F5 code blocks looks jarring. The Classic and Novel styles both use a warm #F5F2E8 cream behind code so it sits with the body color. Pick a code background that's tinted in the same direction as your body color.

9. Check the Preview Before Exporting Long Documents

The export preview reflects whatever style is currently selected. After re-importing an edited .pdfstyle, open the export sheet and scroll through several chapter boundaries before committing to a long export — page-break behavior is the easiest thing to get wrong.

10. Validate Your JSON Before Re-Importing

A misplaced comma or missing brace will cause Atlas to reject the file silently or fall back to defaults. Use a code editor with JSON syntax checking — Visual Studio Code highlights errors as you type, or you can paste the file into any online JSON validator. Keep a known-good backup before each round of edits.

Case Study: The Novel PDF Style

The built-in Novel style is a trade-paperback design and a great template to duplicate when you want a printed-book look. Every feature in this case study maps to a field documented above — duplicate Novel and you can change any of it.

Page

  • Trim size: 5 × 8 inches (pageDimensions = 360 × 576 pt).
  • Two-sided with mirrored margins: top: 64.8, bottom: 54, left (inner): 61.2, right (outer): 36. The inner margin is larger than the outer, so the binding doesn't swallow text.

Body

  • Palatino at 10.5 pt, justified, with a first-line indent of 22 pt and zero paragraph spacing.
  • Line spacing of ~1.43× (encoded as 15 / 10.5) — tight, classic book density.
  • Black body color (#1A1A1A).
  • Links black, no underline — they're inert in a printed book.

Headings

  • headingFontFamily: Palatino shared with the body.
  • H1 = 18 pt, H2 = 14 pt, H3–H6 = 11 pt (matching the body) — H1 stands out, H2 is a quiet section break, H3+ subdivide subtly.
  • The H1 override carries the personality:
    • alignment: center
    • marginTop: 122 (about 1.7 inches of white space above)
    • marginBottom: 25
    • fontWeight: bold
    • pageBreakBefore: true — every H1 starts a new page

Code, Blockquote, Divider

  • Code in Menlo 9 pt on a warm cream #F5F2E8 background.
  • Blockquote indented 36 pt, italic, dark gray.
  • Divider color is dark gray (#333333) for a hand-set feel.
  • Header:
    • defaultContent: .none — verso pages have no header at all.
    • firstPageContent: .none — explicitly blank on the first page of each chapter, even though that page is recto.
    • rightPageContent: .runningHeading(level: 1) — every recto page after the first carries the current chapter title.
    • Centered, 9 pt.
  • Footer:
    • defaultContent: .pageNumber — every page gets a centered page number.
    • 10 pt.

What You'd Change

If you duplicate Novel and edit its style.json, the most common one-line changes are:

  • Trim size"pageDimensions": { "width": 396, "height": 612 } for 5.5 × 8.5, or { "width": 432, "height": 648 } for 6 × 9.
  • Body font — swap Palatino for Garamond, Iowan Old Style, or another serif you have installed by changing bodyFontFamily and headingFontFamily.
  • H1 top margin — raise or lower the chapter opening on the page by editing heading1Style.marginTop.
  • Footer position — move the page number from the centered footer to the outer corner of the header by setting "footerArea": null and putting a pageNumber source on headerArea.rightPageContent / leftPageContent.
  • Two-sided — set "twoSided": false if you're producing a single-sided PDF for digital distribution.

Each of those is a one-field change in the JSON, not a rewrite.

A Complete Example

Here's a minimal but complete style.json for a 6×9 single-sided print PDF with a serif body, indented paragraphs, centered chapter headings on new pages, and a centered page number:

{
    "identifier": "com.example.pdf.simple-novel",
    "name": "Simple Novel",
    "author": "Your Name",
    "styleDescription": "A pared-down 6×9 print layout for short fiction.",
    "pageDimensions": { "width": 432, "height": 648 },
    "margins": { "top": 72, "bottom": 72, "left": 72, "right": 54 },
    "twoSided": false,
    "bodyFontFamily": "Iowan Old Style",
    "bodyFontSize": 11,
    "bodyLineSpacing": 1.45,
    "bodyColor": { "hex": "#1A1A1A" },
    "bodyAlignment": "justified",
    "paragraphSpacing": 0,
    "bodyFirstLineIndent": 20,
    "headingFontFamily": "Iowan Old Style",
    "heading1Size": 18,
    "heading2Size": 13,
    "heading3Size": 11,
    "heading4Size": 11,
    "heading5Size": 11,
    "heading6Size": 11,
    "headingColor": { "hex": "#1A1A1A" },
    "heading1Style": {
        "alignment": "center",
        "marginTop": 110,
        "marginBottom": 24,
        "fontWeight": "bold",
        "pageBreakBefore": true
    },
    "codeFontFamily": "Menlo",
    "codeFontSize": 9,
    "codeBackgroundColor": { "hex": "#F5F2E8" },
    "blockquoteIndent": 32,
    "blockquoteColor": { "hex": "#333333" },
    "blockquoteBorderColor": { "hex": "#DDDDDD" },
    "blockquoteFontSlant": "italic",
    "linkColor": { "hex": "#1A1A1A" },
    "linkUnderline": false,
    "dividerColor": { "hex": "#333333" },
    "footerArea": {
        "defaultContent": { "type": "pageNumber" },
        "alignment": "center",
        "fontSize": 10
    }
}

Drop this into the style.json of any duplicated .pdfstyle package, re-import, and you have a working print-ready style you can iterate on.

See Also