You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Unger, Joachim" <Jo...@softwareag.com> on 2003/02/05 17:01:52 UTC
How: calculate the length of a text
How can I calculate the length (in mm) of a text before output?
Is there a solution für FOP?
Regards,
Joachim
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: How: calculate the length of a text
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Unger, Joachim wrote:
> How can I calculate the length (in mm) of a text before output?
Why do you think you need this?
> Is there a solution für FOP?
Wrong question. There is always a solution in software.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: How: calculate the length of a text
Posted by Clay Leeds <cl...@medata.com>.
You could use a monospace font (e.g., font-family="Courier New, Courier,
monospace"), measure the width of each character, and then count the
number of characters.
Of course, the font-size, will be significant. 8pt Courier text is a
little <2mm wide. You'd also have to consider that spaces at the end of
a line may be removed in favor of a linefeed.
Hope this helps!
Web Maestro Clay
Unger, Joachim wrote:
> How can I calculate the length (in mm) of a text before output?
>
> Is there a solution für FOP?
>
> Regards,
>
> Joachim
--
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org