pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Wulf <...@informatik.uni-kiel.de>
Subject Re: java.awt.Font to PDFont
Date Thu, 21 Feb 2013 12:24:19 GMT
Not directly. So, how could I use it in my situation?

Am 21.02.2013 13:21, schrieb Maruan Sahyoun:
> 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 <chw@informatik.uni-kiel.de>:
>
>> 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 <chw@informatik.uni-kiel.de>:
>>>
>>>> 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: chw@informatik.uni-kiel.de
>>>> 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: chw@informatik.uni-kiel.de
>> 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: chw@informatik.uni-kiel.de
WWW:   http://se.informatik.uni-kiel.de/


Mime
View raw message