# Print a large page as a poster

Print a page (a map, a plan, a chart) bigger than your paper, on several sheets that you tape together. Split the page into tiles with a small script for `sumatrapdf-tool run`, then print the tiles from SumatraPDF, scaled to fill the paper.

**Available in [pre-release 3.7](https://www.sumatrapdfreader.org/prerelease)**

**Split with `sumatrapdf-tool run poster.js plan.pdf tiles.pdf 2 2`, then print `tiles.pdf` with Fit pages to printable area.** At a glance:

- **Split into tiles:** `poster.js` with the number of columns and rows.
- **Overlap for gluing:** an optional fifth argument, in points.
- **Print:** `Ctrl + P`, **Advanced** tab, **Fit pages to printable area**; or `SumatraPDF.exe -print-to-default -print-settings "fit" tiles.pdf`.

`sumatrapdf-tool` is installed with SumatraPDF and added to PATH. [SumatraPDF.exe <tool>](Tools.md) takes the same arguments.

Note: the [poster](Tool-poster.md) tool is meant for this, but in the current pre-release it stops with `format error: malformed page tree`. The script below does the same job.

## Split the page into tiles

Save this as `poster.js`:

```js
// sumatrapdf-tool run poster.js in.pdf out.pdf columns rows [overlap]
var src = Document.openDocument(scriptArgs[0]);
var out = new PDFDocument();
var cols = Number(scriptArgs[2]), rows = Number(scriptArgs[3]);
var overlap = Number(scriptArgs[4] || 0); // in points (1/72 inch)
for (var i = 0; i < src.countPages(); i++) {
	for (var y = 0; y < rows; y++) {
		for (var x = 0; x < cols; x++) {
			out.graftPage(-1, src, i);
			var page = out.loadPage(out.countPages() - 1);
			var b = page.getBounds(); // visible page: [0, 0, width, height]
			var w = b[2] / cols, h = b[3] / rows;
			page.setPageBox("CropBox", [
				Math.max(0, x * w - overlap), Math.max(0, y * h - overlap),
				Math.min(b[2], (x + 1) * w + overlap), Math.min(b[3], (y + 1) * h + overlap)]);
		}
	}
}
out.save(scriptArgs[1]);
```

Split every page of `plan.pdf` into 2 columns and 2 rows:

```
sumatrapdf-tool run poster.js plan.pdf tiles.pdf 2 2
```

- Each page becomes `columns × rows` pages, starting at the top-left tile and going row by row, left to right.
- Tiles are cut from the visible page, so a [cropped](Crop-PDF-margins.md) page is split without its margins.
- Every page of the PDF is split. For just one page, take it out first: `sumatrapdf-tool merge -o page.pdf plan.pdf 3`.

To add an overlap, give it in points (72 points = 1 inch, 28.35 points = 1 cm):

```
sumatrapdf-tool run poster.js plan.pdf tiles.pdf 2 2 20
```

Each tile then reaches 20 points past every cut, so neighboring tiles share a 40-point strip that you can glue over.

## How big the poster gets

Each tile is printed to fill a sheet, so the poster is `columns` sheets wide and `rows` sheets tall:

- An A4 page split 2 × 2 and printed on A4 paper comes out about A2 size, on 4 sheets.
- 3 × 3 gives 9 sheets, three times the width and height.

Tiles of an A4 or Letter page split 2 × 2 have the same shape as the page, so they fill the paper. SumatraPDF turns a wide tile sideways to fit the paper.

## Print the tiles

1. Open `tiles.pdf` in SumatraPDF.
2. Press `Ctrl + P`.
3. On the **Advanced** tab, under **Page scaling**, choose **Fit pages to printable area**. In the Windows 11 print dialog this is under **More settings** → **Page scaling**.
4. Print.

From the command line:

```
SumatraPDF.exe -print-to-default -print-settings "fit" tiles.pdf
```

Use `-print-to "<printer name>"` for another printer. See [Printing](Printing.md) for all options.

## Tips

- Print one tile first (e.g. **Pages** `1` in the print dialog) to check the size before printing them all.
- Printers can't print to the edge of the paper: cut the white border off one side of each sheet, or use an overlap and glue the sheets over each other.
- Write the tile number on the back of each sheet as it comes out; tiles go row by row from the top-left.
- Use `sumatrapdf-tool pages tiles.pdf` to see the area each tile covers (its CropBox).

## See also

- [Printing](Printing.md) — print dialog, page scaling, command-line printing
- [Crop PDF page margins](Crop-PDF-margins.md) — cut off white margins before splitting
- [Split a PDF](Split-a-PDF.md) — split into files, not tiles
- [sumatrapdf-tool run](Tool-run.md), [poster](Tool-poster.md)
- [All cmd-line tools](Tools.md)
