you could use PDTrueTypeFont http://pdfbox.apache.org/apidocs/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.html. PDFont is 'only' a base class.
Maruan Sahyoun Am 21.02.2013 um 13:09 schrieb Christian Wulf <[email protected]>: > Hello again, > > I currently develop a transformation from an HTML/CSS DOM to PDF. It > reads the css information of each element and transforms it to a visual > object within a PDF page. For this purpose, I need to create a PDFont > instance with the information of a java.awt.Font instance that I get > from the DOM. > > Kind regards, > Christian > > Am 21.02.2013 13:02, schrieb Maruan Sahyoun: >> Hi, >> >> could you explain a little bit what you are trying to achieve? Normally in >> PDFBox it's the other way around awt.Font instances are created from PDFont >> e.g. for rendering purposes. >> >> Kind regards >> >> Maruan Sahyoun >> >> Am 21.02.2013 um 11:06 schrieb Christian Wulf <[email protected]>: >> >>> Hello community, >>> >>> I need to get the PDFont instance that corresponds to a given >>> java.awt.Font instance including fontName, fontFamiliy, bold, italic >>> etc. Unfortunately, I could not find any way how to acceive this goal >>> with pdfbox. I have tried the following but stopped at the Dictionary >>> parameter because I do not know such construct: >>> >>> def fac= new PDFontFactory() >>> >>> fac.createFont(dic) >>> >>> >>> Could you help with this "transformation"? >>> >>> Thanks, >>> Christian >>> >>> -- >>> M.Sc. Christian Wulf >>> Research Assistant >>> >>> Software Engineering Group >>> Dept. Computer Science >>> Christian-Albrechts-Platz 4 >>> University of Kiel >>> 24118 Kiel, Germany >>> >>> Room: 1213 >>> Phone: +49 431 880 2776 >>> Fax: +49 431 880 7617 >>> Email: [email protected] >>> WWW: http://se.informatik.uni-kiel.de/ >>> >> > > -- > M.Sc. Christian Wulf > Research Assistant > > Software Engineering Group > Dept. Computer Science > Christian-Albrechts-Platz 4 > University of Kiel > 24118 Kiel, Germany > > Room: 1213 > Phone: +49 431 880 2776 > Fax: +49 431 880 7617 > Email: [email protected] > WWW: http://se.informatik.uni-kiel.de/ >

