Forum How do I...?

Image size to fill the available space

Is there a way to specify that an image size shall be the maximum possible before generating a page break, i.e. that the image fills the available space down to the bottom of the page?
There is no CSS way to do this. It should be possible to use the box-tracking API in Prince to prolong the image with the correct length. It would be nice to have a way to add such layout-dependent content.
However, the latest release of Prince 14 adds some new units you may find interesting: vh, vw, vmin, vmax, pvh, pvw, pvmin, pvmax. So, if you want to fill an entire page, you can do:
img { height: 100pvh; }