Forum How do I...?

prince-shrink-to-fit not changing header/footer

csawjer
The shrink-tp-fit feature work allright. At present (with version 9.02R) header and footer gets smaller font-size when shrinking is necessary.
In the document only some pages need shrinking. This results in header and footer changes in size, which is acceptable in this application.
Is there a way to work araound?
mikeday
Not at the moment, the best approach is not to rely on shrink-to-fit, and instead size the content appropriately. In future we may add a mechanism to apply shrink-to-fit to individual blocks, instead of the whole document.
tos
Hi. Is there any update on this issue?

Problem in our application raises bigger when having for example light gray coloured text in the header, which looks nice but which becomes unreadable when you print it on b/w printers.
mikeday
No, you need to use CSS transforms to scale down your content, or some other mechanism.
tos
Hmm thats not that easy. Cause I have a table with unknown size and columns. And for scaling I need a concrete scaling multiplier.
Or am I missing something here?
mikeday
That is a difficult situation. Without any knowledge of how big the table is, currently there is no way to scale it down and guarantee it fits on one page.
tos
Yes thats why its important that the prince-shrinking only affects the content and ignore the header and footer, which already taken out of the page flow.

The princexml renderer is the only that knows the scaling factor it has applied to the body and could therefore fix it imho.

As headers and footers are already special handled I don't think it would be necessary to shrink single elements. But though it would be cool to have a "shrink-to-parent" functionality.


So what are you plans regarding this issue?
mikeday
We may be able to add this in a future release.
tos
After some month passed it would be nice to have an update on this.

- Is the feature near to be available?
- If not, is there a roadmap or an estimation?

mikeday
We have a new version ready to be tested. Which operating system are you running Prince on?
tos
We run it on linux (ubuntu).
mikeday
Thanks, we have updated alpha versions of Prince for Ubuntu available here.
tos
Thanks for providing us with the alpha version.
My first tests had been successful.
It works like expected. Good work.
We will continue our testing with it.

Do you have a list of changes that are also included?
This could enable us to test some edgecases for too.
mikeday
Recent changes include support for the word-wrap and word-break properties. The full list is the roadmap, the items marked "Done". :)
tos
ah thx overseen that before :)
mikeday
Prince 10 is available, and now shrink-to-fit does not shrink page headers/footers, and there is a new property prince-rotate-body for more control over landscape pages. :)