Possible Duplicate:
Is there any package to automatically select font size and margins to optimize pages?
Is it possible to make a given text fit on n pages, where n is a number chosen by the user?
Preferably by diminishing the margins first (up to a certain point). Changing the fontsize is acceptable too but only after the margins have their minimum values.
The document is plain text. There are no figures, tables or other float like environments. Just plain text with sections and subsections + enumerate and itemize environments. No footnotes either.
Can something like this be achieved through TeX? Or I should use an external script (recompiiling at every circle?)?