Ideas on limiting content to single printed page?
Posted
by James Skidmore
on Stack Overflow
See other posts from Stack Overflow
or by James Skidmore
Published on 2010-06-12T23:03:37Z
Indexed on
2010/06/12
23:13 UTC
Read the original article
Hit count: 185
I have 5-6 text areas that users fill out in a template (a couple of columns, basically a newsletter format). I'm needing to limit their content to one printed page, but I'm having a hard time coming up with practical solutions. The printed format (margin, font size, etc.) will be the same for all users, as it's printed from a central source.
I've had a couple of ideas, but all of them seem rather unreliable and difficult to implement:
- Determine height of content using JavaScript and estimate the number of printed pages from that. The problem with this is that browser font sizes can vary, it's only a rough estimate (pixels to inches), etc.
- Limit the number of characters. This is problematic because there are various text fields, certain characters (like M) take up more space than others (like I), and line breaks obviously count for much more.
What ideas do you all have? I appreciate your help!
© Stack Overflow or respective owner