As already mentioned you have to do the layout yourself. I have been doing the reverse - interpreting sub/superscripts which gives some idea of the relative font sizes, the changes in y and x coordinates, etc. Some people put a lot of effort into this (e.g. in maths, where considerable kerning is often practised).
Is it possible that using Unicode sub and superscripts ( http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts ) might give a quick solution? I don't like this myself because they would not be easily searchable. On Thu, May 9, 2013 at 1:06 AM, Buzzy Spain <[email protected]> wrote: > Hi all, > > I need to add text to a pdf that includes a number of superscript and > subscript characters. Is there a "right" way to do this? My assumption is > that drawing the string at some location and then drawing the > super/subscript at a reduced point size offset up or down is not best > practice. It will certainly be a pain... > > The data I have is coming from a java String (UTF-16). The String literal > is being saved with an IDE that probably saves in a less preserving format > (UTF-8?). I can change the data source if it makes my life easier. > > I am new to the world of PDFBox and the details of fonts so feel free to > start at the beginning and drive slowly. :) > > Thanks, > Buzzy > -- Peter Murray-Rust Reader in Molecular Informatics Unilever Centre, Dep. Of Chemistry University of Cambridge CB2 1EW, UK +44-1223-763069

