| PDF-FromHTML documentation | Contained in the PDF-FromHTML distribution. |
PDF::FromHTML::Template::Container::Row
To specify a row of text and provide typewriter-like carriage returns at the end.
ROW
PDF::FromHTML::Template::Container
None
TEXTBOX
None
<row h="8">
<textbox w="50%" justify="right" text"Hello,"/>
<textbox w="50%" justify="left" text"World"/>
</row>
Rob Kinyon (rkinyon@columbus.rr.com)
PAGEDEF, TEXTBOX
| PDF-FromHTML documentation | Contained in the PDF-FromHTML distribution. |
package PDF::FromHTML::Template::Container::Row; use strict; BEGIN { use vars qw(@ISA); @ISA = qw(PDF::FromHTML::Template::Container); use PDF::FromHTML::Template::Container; } sub enter_scope { my $self = shift; my ($context) = @_; $self->SUPER::enter_scope($context); $context->{X} = $context->get($self, 'LEFT_MARGIN'); return 1; } sub deltas { my $self = shift; my ($context) = @_; return { X => $context->get($self, 'X') * -1 + $context->get($self, 'LEFT_MARGIN'), Y => -1 * $self->max_of($context, 'H'), }; } sub total_of { my $self = shift; my ($context, $attr) = @_; return $self->max_of($context, $attr) if $attr eq 'H'; return $self->SUPER::total_of($context, $attr); } 1; __END__