Tutorial · Stage 5 of 6
Page Layout and Margins in ScanTailor Advanced: Hard Margins, Soft Margins, Uniform Pages
This is the stage that makes a stack of independently scanned pages read as one book: the same margins on every page, the same finished size, the text block sitting in the same place. The mechanism is two kinds of margin — and understanding the difference is the whole stage.
Hard Margins: The Ones You Set
At Page Layout you adjust the margins added around the content area from the previous stage. Hard margins are the space inside the solid lines on the page preview: they are yours, set by dragging the lines — outer as well as inner — or by typing numeric values. Hard margins are the page’s own, guaranteed whitespace: content, plus exactly this much breathing room, on every page.
The built-in default profile ships with margins of 5, 10, 5, 10 mm (top, right, bottom, left in the usual reading order) — a reasonable starting point for a reading edition. Raise them when the output will be printed and bound (the inner margin needs room for the binding), lower them when you are optimising for screen reading or e-ink. Because margins are a project-wide aesthetic decision, set them on a representative page and apply to the whole book rather than tuning per page; the values are part of the project, and ScanTailor Advanced’s default-parameters system can even save your preferred margins as the default for future projects.
Units are not fixed to millimetres: the program’s measurement system offers pixels, millimetres, centimetres and inches throughout, and margin values follow the units you choose.
Soft Margins: The Ones the Largest Page Imposes
Soft margins are the space between the solid lines and the dotted lines on the preview. You do not set them directly — they are added automatically to bring each page up to the size of the largest page in the project. If you see a dotted line, somewhere in the project there is a page whose content-plus-hard-margins reaches that width, or another that reaches that height.
In other words: one large page causes soft margins to appear on every other page, unless the option to match size with other pages is disabled for them. That trade is the point of the stage — a book whose pages are all the same size flips, prints, and binds evenly — but it has a sharp edge:
Alignment: where the soft margin goes
What you do control is placement. The alignment settings determine whether soft margins are added, and on which sides — i.e., where the content block sits within the equalised page: pushed to the top, centred, or mirrored for left/right pages as in a bound book. ScanTailor Advanced reworked the alignment modes inherited from the earlier branches:
- Manual — the classic behaviour: your hard margins, your alignment choices.
- Auto margins — the program decides per page whether aligning to the top, bottom, or centre is the better fit.
- Original — pages keep their original vertical position, preserving the source layout’s placement rather than re-flowing it.
Vertical and horizontal automatic alignment can be controlled separately in the auto and original modes. For fine positioning there are also guides at this stage — horizontal and vertical lines you place on the page (right-click to create or remove) that content can be dragged or snapped against; the guides adapt automatically when the page’s soft margins change.
A Sane Workflow for a Whole Book
- Finish Select Content properly first — Page Layout cannot fix bad boxes, it can only expose them (via the giant-page effect above).
- Set hard margins on one typical page; check the preview against a dense page and a sparse page.
- Apply the margins to all pages; let soft margins equalise sizes.
- Scroll the thumbnail strip. Pages flagged by the deviation highlighting at this stage are the ones whose layout does not match the others — inspect those individually.
- Decide the match-size exceptions deliberately: covers, fold-outs and plates are legitimate non-matching pages. Disable “match size with other pages” for them rather than letting them dictate the book’s size, or distorting them to fit it.
- Sanity-check Source DPI while you are here: page sizes are physical sizes, computed from DPI. v1.2.0 added inline Source DPI fields in the Margins panel precisely because a wrong DPI value shows up at this stage as a page that is physically the wrong size. If one page’s real-world dimensions look absurd, its DPI metadata is the first suspect — see the DPI guide.
Frequently Asked Questions
What is the difference between hard and soft margins?
Hard margins are the whitespace you set, shown inside solid lines, and they belong to the page itself. Soft margins, shown between the solid and dotted lines, are added automatically to bring the page up to the size of the largest page in the project, so every page ends up the same size. You control soft margins indirectly — through alignment settings and the match-size option.
Why did all my pages suddenly get bigger?
One oversized page — usually a content box drawn too wide at Select Content — raises the common page size for the whole project, and every other page gains soft margin to match. Sort thumbnails by width or height, find the outlier, and fix its content box. In v1.2.0 you can also lock the aggregate size for the match-size workflow once it is correct.
Should every page match size?
For ordinary book pages, yes — uniform size is what makes the finished book flip, print, and bind evenly. Legitimate exceptions are covers, fold-outs, and plates; disable “match size with other pages” for those pages specifically instead of letting them set the size for the whole book.
