(PECL pdflib >= 2.0.0)
PDF_create_annotation — Create rectangular annotation
$pdfdoc
, float $llx
, float $lly
, float $urx
, float $ury
, string $type
, string $optlist
)Creates a rectangular annotation on the current page.
Anonymous (2011-09-15 17:25:45)
Annotation as URL
<?php
$url = PDF_create_action($pdf, "URI", "url=http://www.pdflib.com");
PDF_create_annotation ($pdf, 44, 500, 55, 600, "Link", "linewidth=1 action {activate $url}");
?>
Annotation as GoTo
<?php
$optlist = "destination={page=1 type=fixed left=50 top=700 zoom=1}";
$action = pdf_create_action($pdf, "GoTo", $optlist);
PDF_create_annotation ($pdf, 44, 400, 55, 450, "Link", "linewidth=1 action {activate $action}");
?>