Hi;
 
Attached is a program that determines the text width using both Java and iText. The output is:
iText width = 81.26401
java width = 75.0
java bounds width = 74.09375
java bounds method 2 width = 75.0
The iText width measure appears to be more accurate when the actual pdf is written. However, my code is all written using the java AttributedString/AttributedCharacterIterator code which handles all the word breaks, etc. based on locale which I also need.
 
Any ideas on how to get the java calls to return values that match what Acrobat displays? Because at the moment I have the end of one word overwriting the bef=gining of the next (when there is a character format change between the words and I have to display each seperately).
 
thanks - dave

Attachment: RegisterFonts.java
Description: Binary data

Attachment: TextWidthTest.java
Description: Binary data

Reply via email to