| PDF-FromHTML documentation | Contained in the PDF-FromHTML distribution. |
PDF::FromHTML::Template::Element::WebLink
To provide a clickable web-link
WEBLINK
PDF::FromHTML::Template::Element
The dimensions of the clickable area
None
Nothing
None
This node is currently under review as to whether it should be removed and a URL attribute should be added to various nodes, such as IMAGE, TEXTBOX, and ROW.
Rob Kinyon (rkinyon@columbus.rr.com)
| PDF-FromHTML documentation | Contained in the PDF-FromHTML distribution. |
package PDF::FromHTML::Template::Element::Weblink; use strict; BEGIN { use vars qw(@ISA); @ISA = qw(PDF::FromHTML::Template::Element); use PDF::FromHTML::Template::Element; } sub render { my $self = shift; my ($context) = @_; return 0 unless $self->should_render($context); return 1 if $context->{CALC_LAST_PAGE}; my $url = $context->get($self, 'URL'); unless (defined $url) { warn "Weblink: no URL defined!", $/; return 1; } my @dimensions = map { $context->get($self, $_) || 0 } qw( X1 Y1 X2 Y2 ); $context->{PDF}->add_weblink( @dimensions, $url ); return 1; } 1; __END__