---
title: 'Custom sizes, one long page and fit to width'
canonical: 'https://www.dealmobile.co.uk/writing/page-options-custom-size-continuous-fit'
url: 'https://www.dealmobile.co.uk/writing/page-options-custom-size-continuous-fit'
type: Post
published: '2026-11-02'
summary: 'Not every PDF is an A4 page. PrintMD’s page options cover a custom size, one continuous page, scaling wide tables to fit and your own margin, and each has an edge case worth knowing.'
---

# Custom sizes, one long page and fit to width

Published 2026-11-02

![PrintMD’s Page options dialog open over a lunch menu document: Custom size is ticked at 100 by 210 millimetres, the layout is One continuous page, Fit is set to Fit width and the margin is 8 millimetres.](https://www.dealmobile.co.uk/sites/default/files/styles/almanac_shot_md/public/content/images/posts/page-options-custom-size-continuous-fit/hero.png.webp?itok=7chk-djs)

Not every PDF is an A4 page. A one-page menu, a slide, a long receipt: each wants a different shape. [PrintMD](https://www.dealmobile.co.uk/projects/printmd.md) has four page options for them, and the editor remembers them for each document.

## Custom size

Open the page options, tick custom size and give a width, a height and a unit: millimetres, centimetres, inches or pixels. In front matter and in the PDF service the size is one value, so `100x150mm`, `8.5x11in` and `1200x800px` all work. A pixel is the CSS pixel, a 96th of an inch, so 1200 by 800 pixels is 317.5 by 211.7 millimetres.

There are limits, for good reasons. Each side runs from 30 mm to 5080 mm, which is 200 inches, and a page can’t be bigger than four square metres. A tiny page with a long document could otherwise make thousands of pages, so the PDF service refuses a custom size that would print more than 5,000, and the editor warns you before it prints one.

## One continuous page

Some documents aren’t made of pages at all. Choose the continuous layout and the whole document goes onto a single page of the width you chose, exactly as tall as the content. There are no page breaks and no running head or foot.

![A lunch menu printed as one continuous page 100 millimetres wide: a cover with the title and date, then Soup, a Mains table with three dishes and prices, and Pudding, with no page breaks.](https://www.dealmobile.co.uk/sites/default/files/styles/almanac_shot/public/content/images/posts/page-options-custom-size-continuous-fit/continuous-menu.png.webp?itok=c0dUv-wm&v=74c95175)

*A real render from the PDF service: 100 mm wide, and as tall as the menu, which came out at about 313 mm.*

The height has to be measured after the fonts and images have loaded, so the page is laid out first, measured, then printed at that height. If the result is taller than one PDF page can be, it’s split into a few tall pages, with a little room to spare at each break, and a note says so. A heading stays with what follows it across the split. A block that can’t break, such as a table row or an image, moves whole to the next piece, which can leave a gap; I’d rather you knew that than had it hidden. The PDF service refuses a document that would run past 50.8 metres.

## Fit to width

A wide table or image runs past the margin. Fit width scales the block down to fit the column instead, and tells you what it did: “Table 1 is scaled to 72% to fit the page width.” If a block would need to shrink below 40%, it’s left at full size with a warning, because text that small can’t be read.

The continuous layout has a third choice, widest block, which makes the page as wide as the widest block and scales only what is still too wide.

## Margin

Leave the margin empty to use the template’s. Otherwise give a number in millimetres, centimetres, inches or points, up to about 100 mm. The page has to keep at least 20 mm across for the text: the page options won’t save a margin that leaves less, the PDF service answers such a request with an error, and a margin from front matter is reduced to fit, with a note. In the Dealmobile template, the running head and foot need a margin of 18 mm or more, so under that they’re left out and you’re told.

## In front matter

The page options can also sit at the top of the document, so the file carries its own page:

```markdown
---
title: Lunch menu
page-size: 100x210mm
layout: continuous
fit: width
margin: 8mm
---

```

The editor reads `layout`, `fit` and `margin` from the front matter, and anything you save in the page options wins, one setting at a time. It takes the page size from its Size menu instead, so `page-size` is only read by the PDF service. The service reads all four, and a value in the request wins over the front matter.

- **Projects:** [PrintMD](https://www.dealmobile.co.uk/projects/printmd.md)
- **Tags:** [Markdown](https://www.dealmobile.co.uk/writing/tag/markdown.md), [PrintMD](https://www.dealmobile.co.uk/writing/tag/printmd.md)

---

Index of this site: [llms.txt](https://www.dealmobile.co.uk/llms.txt)
