On Mon, Aug 1, 2016 at 2:23 PM, John Hewson <j...@jahewson.com> wrote: > That’s correct. getStringWidth is for use when creating new PDFs only, and we > don’t > implement kerning, so the width you get will be “correct” with respect to the > text > in the newly created PDF.
So, I guess I don't understand this part. My impression was that if you wrote something like "/Helvetica 12 Tf (AVAVAV) Tj" to the PDF document, a reader displaying the document would use the standard-14 Helvetica font to draw the string "AVAVAV" to the screen, and because that font implements kerning for those character combinations, the reader would display the text as more compressed horizontally than in the absence of kerning. So my expectation is that if you did the commands above and then drew a box around it using the horizontal dimension provided by getStringWidth("AVAVAV"), your box would display as slightly larger than the visible text width due to the absence of kerning in calculating the box size based on the text width at the time you wrote the document, but the presence of kerning in rendering the text in the reader. Where am I going wrong there? Thanks, Aaron --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org