File: Header.pm

package info (click to toggle)
libpdf-fromhtml-perl 0.34-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 576 kB
  • sloc: perl: 4,876; makefile: 15
file content (80 lines) | stat: -rw-r--r-- 1,251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package PDF::FromHTML::Template::Container::Header;

use strict;

BEGIN {
    use vars qw(@ISA);
    @ISA = qw(PDF::FromHTML::Template::Container::Margin);

    use PDF::FromHTML::Template::Container::Margin;
}

sub enter_scope
{
    my $self = shift;
    my ($context) = @_;

    $self->SUPER::enter_scope( $context );

    @{$self}{qw/OLD_X OLD_Y/} = map { $context->get($self, $_) } qw(X Y);

    $context->{X} = 0;
    $context->{Y} = $context->get($self, 'PAGE_HEIGHT');

    return 1;
}

1;
__END__

=head1 NAME

PDF::FromHTML::Template::Container::Header - Provide header text and to specify where the header starts, for looping.

=head1 NODE NAME

HEADER

=head1 INHERITANCE

PDF::FromHTML::Template::Container::Margin

=head1 ATTRIBUTES

=over 4

=item * HEADER_HEIGHT - the amount reserved for the header from the bottom of
the page.

=back

=head1 CHILDREN

None

=head1 AFFECTS

Indicates to the PAGEDEF tag where all children may start rendering.

=head1 DEPENDENCIES

None

=head1 USAGE

  <pagedef>
    <header header_height="1i">
      ... Children here will render on every page ...
    </header>
    ... Stuff here ...
  </pagedef>

=head1 AUTHOR

Rob Kinyon (rkinyon@columbus.rr.com)

=head1 SEE ALSO

ALWAYS, FOOTER, PAGEDEF

=cut