You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by nbs skill <nb...@gmail.com> on 2023/02/08 14:11:52 UTC

need help with pdf signatures

Hello,

I need to add a visible signature to a PDF using pdfbox.
I used this:
https://github.com/apache/pdfbox/blob/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
But, I need to fill out a signature rectangle with dynamic text without
exceeding the rectangle's edges and the text should not be cut.
Could you help me with this, please?

Thanks in advance

Re: need help with pdf signatures

Posted by Tilman Hausherr <TH...@t-online.de>.
Use PDFont.getStringWidth() to get the size of a text. That number must 
usually be divided by 1000.

Tilman

On 08.02.2023 15:11, nbs skill wrote:
> Hello,
>
> I need to add a visible signature to a PDF using pdfbox.
> I used this:
> https://github.com/apache/pdfbox/blob/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java
> But, I need to fill out a signature rectangle with dynamic text without
> exceeding the rectangle's edges and the text should not be cut.
> Could you help me with this, please?
>
> Thanks in advance
>


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