How to make image splice into multiple pages?

Is it possible to achive the behavior of image spanning multiple pages? Similar to when chrome prints image it basically splice into multiple pages if the image doesn’t fit in current page.

Appreciate any suggestions on how to even implement own wasm extension for this.

Hi, welcome to our forum! Here are some pointers on a possible approach in Typst: assuming you know the page size, you can use measure to get the natural size of the image, and compute from that the number and size of image parts that you need. Then you can place the image several times, each time in a box or block with negative insets and clip: true to show only some section of the image. Also to determine the right size for the first section, if the page is not empty, you could use here().position() and some computation with the margin size (which you would need to know).

Note that the hard part is the layout computations, and these must be done by in Typst script. You could make a plugin to cut the image in parts once you know the sizes but I don’t know if that would give better performance.