Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

Anyone, On the PDF, is it possible to have superscript like - g/m3 using PDF itext + java

Anyone, On the PDF, is it possible to have superscript like -  g/m3
0
Sgraceivey
Asked:
Sgraceivey
  • 2
  • 2
1 Solution
 
Brian UtterbackPrinciple Software EngineerCommented:
I am afraid you need to be a little more specific as to the question you are asking.
Can PDF print superscripts? Sure.
Can Java create output that is converted into PDF? Sure.
Can Java print out PDF files? Yes, but it may require some extra class files.

So, please tell use exactly what you are trying to do.
0
 
SgraceiveyAuthor Commented:
Thanks for your quick response. Now i understand from your responce that java class file can print superscripts into PDF files.

I work on java programming. i have several java class files which print output on PDF files. I have a new requirement to print superscript like -  g/m3 from java class file to PDF file. How do i construct supercript (g/m3) in a java class file. I appreciate if you can provide me snippet code.

Thanks in advance.
0
 
Brian UtterbackPrinciple Software EngineerCommented:
That would depend on the class files you are using. Generally, the sub- or super-scripting is a font attribute. I would
guess that there is something in the class that allows you to set the fonts and their attributes. You just need to call that
class again, turning super-scripting on, print the single character and then turn it off again. Alternately, the class file may have a method explicitly for printing superscripts. Check the docs for the class files you are using to output to PDF.
0
 
SgraceiveyAuthor Commented:
Thanks for providing the information.  We have not had the chance to try the solution but it put me in the right direction.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now