Splitting a large image across multiple printed pages without alignment marks
I recently added tiled printing to a small static tool I run ( ArtGrid ) — the kind of "print a big image across several A4 sheets and tape them together" feature you've probably seen in poster-printing tools. The naive version is easy: slice the enlarged image into a grid of page-sized rectangles, export each as a PDF page. The annoying version is making the pieces line back up on paper, where a…
I recently added tiled printing functionality to a small tool called ArtGrid, which allows users to print a large image across multiple A4 sheets and tape them together. The naive approach is to slice the enlarged image into a grid of page-sized rectangles and export each as a separate PDF page. However, aligning the pieces on paper can be challenging due to printer scaling errors, which compound across each seam.
To avoid the need for alignment marks, I changed where the cuts land by cutting on lines that are already present in the grid. By forcing every page boundary to land exactly on a grid line, there is no need for trimming since the join is a continuation of a mark that would have been drawn anyway. The key constraint is that the cell size must be square, as non-square cells would not provide a fixed unit for tiling and would require alignment marks once again.
The implementation involves calculating the number of columns and rows that fit on a single page based on the printable area and dividing the total number of columns and rows by these values to determine the number of pages needed. A simple assertion was written to test if the reconstructed printable rectangle from all the tiles matches the original enlarged rectangle to within a millimeter, ensuring the accuracy of the tiled print.
The tool can be tested at griddrawing.org/print-large-image-multiple-pages, where a static client-side version is available with a printed ruler for calibration.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.