Paperscale prepares a print-ready PDF of an image at an exact size in millimetres, on one A4 sheet or tiled across several. It runs entirely in your browser and needs JavaScript to work.
pdf-lib, MIT Licensegithub.com/dudarievmykyta