contiang Posted July 10, 2007 Share Posted July 10, 2007 Hi everybody, I need to display mathematical symbols in PDF. Especially superscript and subcript. I am using jasperreports to generate my pdf document. Anyone can tell me how to do it? Thanks. Link to comment Share on other sites More sharing options...
szaharia Posted July 10, 2007 Share Posted July 10, 2007 The styled text attribute offer support for both subscript and superscript. Use isStyledText="true", and then feel free to use tags for your symbols. hth,sanda Link to comment Share on other sites More sharing options...
contiang Posted July 10, 2007 Author Share Posted July 10, 2007 Could you please explain how to use tags. For example i want to display e=mc^2 with 2 is the super script. Link to comment Share on other sites More sharing options...
szaharia Posted July 10, 2007 Share Posted July 10, 2007 Hi, There are <sup /> and <sub /> tags for superscript and subscript allowed in a styled text. You could write your expression as:Code:E = mc<sup>2</sup>For more information, please consult our [url=http://www.jasperforge.org/index.php?option=com_docman&task=doc_details&gid=57]Styled Text Report Sample. Regards,sanda Link to comment Share on other sites More sharing options...
contiang Posted July 11, 2007 Author Share Posted July 11, 2007 Thanks very much guys....;) Link to comment Share on other sites More sharing options...
contiang Posted September 13, 2007 Author Share Posted September 13, 2007 Hi guys, I've done with subs and sups... Everything is ok except I need to diplay some mathematical symbols in my reports (PDF). Anybody can tell me how to display these simbols in iReport/jasperreports? I've attached a symbols in the pdf files that i've downloaded from the net. [file name=Unicode_Reference___U2200.pdf size=153486]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Unicode_Reference___U2200.pdf[/file] Link to comment Share on other sites More sharing options...
itchytoes Posted September 15, 2007 Share Posted September 15, 2007 Hi -- Of the 14 built-in fonts for PDF, your best bet is probably Symbol for the math fonts. I use ZapfDingbats a lot, but that does not have the math stuff. You might see if you can find what the Symbol fonts are for the various characters, then set your pdfFontName="Symbol" for the characters that you want to output as math symbols. If Symbol does not have what you want, you will need to find a font file and put that in your path and set the pdfFontName to that file, and set isPdfEmbedded="true" to be sure that the font is included with the pdf and everyone opening the PDF will have the font. Betty Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now