in reply to Re: Add text field to PDF
in thread Add text field to PDF

awesome! This is perfect! Thank you. Question: I need to set the length of the rect. For this I need to measure the width of my text string. I normally used this:

my $width = $text-> advancewidth( $string );

Can you point me to how to measure the width of the text of inside the rect?

Replies are listed 'Best First'.
Re^3: Add text field to PDF
by Anonymous Monk on Nov 26, 2019 at 14:54 UTC

    Solved. Using

    my $width = $text-> advancewidth( $string );

    but remembering to use the same font in $text and $annotation works fine!