pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Text overlap
Date Mon, 09 May 2016 15:33:41 GMT
Am 09.05.2016 um 17:15 schrieb Ivan Ridao Freitas:
> I'm trying your suggestion but I don't know how to "set the clipping 
> path". Also, by "draw your text" you mean "content.showText(text);" or 
> there is another function to draw it (the text will be a graphic on 
> the PDF or will be added as text?).

set the clipping path is done with clip().

add a rectangle is done with addRect().

yes I meant showText().

Tilman

>
> Since the text is dynamic changing the font size is not an option :)
>
> Ivan
>
> Tilman wrote:
>> What I've seen in PDFs "in the wild" is this:
>>
>> - save graphics
>> - rectangle
>> - set clipping path
>> - draw your text
>> - restore graphics
>>
>>
>> Another strategy, if you want to avoid cutting off, is to use a smaller
>> font if the text gets too large, or a narrow  font (Arial narrow).
>>
>> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message