Forum Feature requests

Dynamic page height

dschroeder
We need some kind of dynamic page height feature. We want to use Prince for producing newspaper ads which have a dynamic page height. The with of the ad page is stable so that the height could be content sensitive. Maybe there is already a possibility to emulate this feature (e.g. analyzing the box height of the content after rendering)? Or is there a plan for implementing this?
mikeday
Currently the PDF page size is fixed in advance, using the @page rule with the size property. If all the content fits on one page, then it might be possible to analyse the height of the root element box using the box tracking API in the latest alpha builds, then regenerate the PDF with an updated @page rule specifying the desired height. It might take a bit of experimentation to get it right, though.