Skip to content

Instantly share code, notes, and snippets.

@guyromm
Created August 21, 2025 07:56
Show Gist options
  • Select an option

  • Save guyromm/30975bc9cb93c2855a10037779668a73 to your computer and use it in GitHub Desktop.

Select an option

Save guyromm/30975bc9cb93c2855a10037779668a73 to your computer and use it in GitHub Desktop.
convert kiri:moto exported svg slices into a tiled PDF for printing and subsequent gluing on cardboard/pvc boards
# Usage: ./tile-a4.sh input.svg [out.pdf]
set -euo pipefail
IN="${1:?SVG required}"
OUT="${2:-tiled.pdf}"
# 1) Make giant, true-scale PDF of the drawing bounds
inkscape "$IN" --export-type=pdf --export-filename=big.pdf --export-area-drawing
# 2) Lock poster size to input PDF page size (pts -> mm)
SZ=$(pdfinfo big.pdf | awk '/Page size:/ {printf "%.2fx%.2fmm", $3*25.4/72, $5*25.4/72}')
# 3) Tile to A4, add tile frames for cutting
pdfposter -mA4 -p"$SZ" big.pdf "$OUT"
echo "Done: $OUT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment