i know that itext can do all things, it's a great library :-)
but an example:
a line with three words, the line is aligned justified. the word in the
middle has a different characterspacing than the first and third one. so
it's fact that with high level objects it only works in "two go's",
ist't it?
if it is so, how do you know the spaces between the words to align the
line justified?
Paulo Soares schrieb:
iText can do all that with high level objects, perhaps not all at the
same time in a single go. If you really want to do it "by hand" see the
BaseFont methods getCharBBox(), getWidth(), getWidthPoint() and
getAscent().
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Martin Resch
Sent: Wednesday, June 15, 2005 4:06 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] exact width of text
i've had to create complex pdf documents with different
styled text. a
text could be in text box, e.g. 100x100 points. the single
words in this
fictive textbox could have:
- different character spacings
- different leadings
- different fonts
- different angles
- different baseline offsets
- different font sizes
- different colors
- different alignments (first line left, second line right)
- the text should be hyphenated
- and many more
at the moment i work with a pdfptable with one cell (my fictive
textbox), but with this solution it isn't possible to set different
leadings or character spacings or other things.
i appreciate that i have to place word for word, maybe letter
for letter
direct in the content byte, best in columntext.
but for this mission i have to know exacly the width and the
heigth for
each specific word (letter), to made the justified alignment
for example
manually by calculation the space between the words in the
(hypenated)
line...
maybe a mission impossible....
Paulo Soares schrieb:
Maybe you should explain us why do you need it. As far as iText is
concerned all the widths are consistent with what is reported and
printed.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Martin Resch
Sent: Wednesday, June 15, 2005 3:28 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] exact width of text
hello,
is there ANY way (maybe without iText) to get a more
exact width of a
text than the getWidthPoint()-method? or any possibility to get all
informations (em quadrat, exact width of any character of the
font) to
calculate the exact width manually?
the FontMetrics-Class from j2se is unfortunately not
exact as the
getWidthPoint()-method.
thanks for your answers.
best regards,
martin
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions