#!/usr/bin/perl use PDF::API2; use PDF::API2::Annotation; use PDF::API2::Content; use diagnostics; use utf8; use warnings; use strict; my ($pdf, $page, $annot, $text, @text, $txt, %option, $name, @txt, $pagenumber, $url); $pdf = PDF::API2->open("31746_ST4A_B-GR.pdf"); $page = $pdf->openpage(1); $annot=$page->annotation; %option =( -open=>(1), -rect=>[0,0,0,50] ); $annot->text("test",%option); $pdf->saveas("document.pdf"); $pdf->end;