pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkühler <andr...@lehmi.de>
Subject Re: DrawString with TrueType embedded fonts.
Date Sun, 15 Feb 2009 13:02:28 GMT
Shawn A schrieb:
>> Hmmm, I still try to understand what you're trying to do? What is the
>> goal of your implementation? Do you try to put some text on a page and
>> convert this page to a png image?
>> If I am right I suggest to do it like this:
> What I am trying to accomplish right now is just use the embedded truetype font
> and render some text to an image. Are you talking about the previous
> time we talked
> when you mentioned implementation?
No, last time we talk about overlapping characters.
Perhaps there is a easier or better way to do the same. But first of all
I have to understand in detail what you are trying to do. And that's why
I'm asking so much ;-))

>> - create a PDDocument
>> - add a PDPage to the document
>> - add the needed fonts to the document wiht PDTrueTypeFont.loadTTF
>> - use PDPageContentStream to add some text with beginText, drawString,
>> endText etc.
>> - use PDPage.convertToImage to create the image
> I could do that, except that the TTF's I have are still inside of an
> existing PDF, so I need to add it another way. 
So, is it correct, that the only reason for you to load the pdf is to
use the embedded fonts for drawing strings on a buffered image?

> I am also not sure if you are mentioning
> this in the context
> of the last time we spoke or not?
No, see above.


View raw message