The attached join.js script demonstrates how to combine multiple polygon elements into a single path element. You can run this on a single SVG file and it should fix the cracks:
prince --script join.js Test.svg
(Please note that this script is specific to your SVG files and will not work for all SVG files).
While this is a solution, I'm not sure what is the best way to run it if you are including multiple SVG files as images from a single HTML file, as these will not be accessible to scripts.
One way would be to run Prince on each SVG individually first and write out document.innerHTML to the console to capture the transformed SVG, although this feels a little clunky.
You could also take the function in the script and put it in your own code called outside of Prince, which may be easier.
- join.js 1.2 kB