Hello
I want to add a text field to an existing PDF. With text field I mean the square boxes you can add to your PDF and write text in it. I am experimenting with PDF::Builder which seems very easy to use and mantained. I have been succesful in adding a text to an existing PDF but nor a text field. I want the PDF user been able to move the field if necessary inside the PDF. In the PDF::Builder manual I could not find any referece to text fields.
use strict; use warnings; use PDF::Builder; my $pdf = PDF::Builder->open('in.pdf'); my $page_number=1; $page = $pdf->openpage($page_number); $font = $pdf->corefont('Helvetica-Bold'); # Add some text to the page my $text = $page->text(); #this creates text, I need a text box $text->font($font, 16); $text->translate(200, 700); $text->text('Hello World!'); # Save the PDF $pdf->saveas('out.pdf');
In reply to Add text field to PDF by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |