Skip to content
huzpsb edited this page Oct 25, 2026 · 1 revision

Poster

Tile a page up into a poster: optionally scale the page, then cut it into tiles of a printable paper size (with optional glue margins).

Command line

pdfcpu2 poster [-p pageSelection] description inFile outDir [outFile]

<description> — comma-separated:

Entry Meaning
scale: / sc: enlarge page by factor > 1 before tiling
form: / f: tile paper size (see Paper)
dim: tile dimensions (display units)
margin: glue area (display units)
bgcol: margin color
border: content region border
pdfcpu2 poster 'f:A4' in.pdf outDir              # A2 page → 2x2 grid of A4
pdfcpu2 poster 'f:A4, scale:2.0' in.pdf outDir   # scale to A0 → 4x4 grid of A4
pdfcpu2 poster 'dim:15 10, margin:1, bgcol:DarkGray, border:on' in.pdf outDir -u cm

Go API

package main

import (
	"context"

	"github.com/huzpsb/pdfcpu2/pkg/api"
	"github.com/huzpsb/pdfcpu2/pkg/pdfcpu/model"
)

func main() {
	ctx := context.Background()
	conf := model.NewDefaultConfiguration()

	cut := &model.Cut{PageSize: "A4", Scale: 2.0}

	err := api.PosterFile(ctx, "in.pdf", "./tiles", "", nil, cut, conf)
	if err != nil {
		panic(err)
	}
}

Related: N-Down (no scaling), Cut (arbitrary cut points).

Clone this wiki locally