Marco wrote:
>> Why do you want to add text to a PDF
>> using java.awt.Image?
> I need Canvas for insert some mathematics formulas inside text, and it
> works.
It would work ever better if you used PdfGraphics2D.
> N.B. I don't want use iText after create a Canvas,
I don't understand: you want the image but not the PDF?
Then why not just drop iText and work with JDK stuff only?
> I want only set the
> same Font for text of Canvas and for iText. If default itext Font is
> Helvetica, I can simply do "g.setFont.setName("Helvetica");" in paint of
> Canvas, but I don't know if all JVM have this Font, and if it is esactly
> the same of the iText package. And I read that "the five font families
> defined by the Java platform which must be supported by any Java runtime
> environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput."
> (http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Font.html). Not
> Helvetica...
I fear you don't understand what I'm talking about.
It's a pity, because your problem is very easy to solve.
Just use PdfGraphics2D and draw the mathematical formulas
and text to this special Graphics2D object. It works like
a charm. Ah well, it's your choice...
br,
Bruno
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/