To have text in a text field show up as sub- or superscript you need to use the Rich Text Formatting option. Enable that in your field and then read about the richValue property and how to set it using an array of Span objects. Among the properties of these objects are subscript and superscript.
Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: email@example.com