line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#=======================================================================
|
2
|
|
|
|
|
|
|
# ____ ____ _____ _ ____ ___ ____
|
3
|
|
|
|
|
|
|
# | _ \| _ \| ___| _ _ / \ | _ \_ _| |___ \
|
4
|
|
|
|
|
|
|
# | |_) | | | | |_ (_) (_) / _ \ | |_) | | __) |
|
5
|
|
|
|
|
|
|
# | __/| |_| | _| _ _ / ___ \| __/| | / __/
|
6
|
|
|
|
|
|
|
# |_| |____/|_| (_) (_) /_/ \_\_| |___| |_____|
|
7
|
|
|
|
|
|
|
#
|
8
|
|
|
|
|
|
|
# A Perl Module Chain to faciliate the Creation and Modification
|
9
|
|
|
|
|
|
|
# of High-Quality "Portable Document Format (PDF)" Files.
|
10
|
|
|
|
|
|
|
#
|
11
|
|
|
|
|
|
|
#=======================================================================
|
12
|
|
|
|
|
|
|
#
|
13
|
|
|
|
|
|
|
# THIS IS A REUSED PERL MODULE, FOR PROPER LICENCING TERMS SEE BELOW:
|
14
|
|
|
|
|
|
|
#
|
15
|
|
|
|
|
|
|
#
|
16
|
|
|
|
|
|
|
# Copyright Martin Hosken
|
17
|
|
|
|
|
|
|
#
|
18
|
|
|
|
|
|
|
# No warranty or expression of effectiveness, least of all regarding
|
19
|
|
|
|
|
|
|
# anyone's safety, is implied in this software or documentation.
|
20
|
|
|
|
|
|
|
#
|
21
|
|
|
|
|
|
|
# This specific module is licensed under the Perl Artistic License.
|
22
|
|
|
|
|
|
|
#
|
23
|
|
|
|
|
|
|
#
|
24
|
|
|
|
|
|
|
# $Id: Number.pm,v 2.0 2005/11/16 02:16:00 areibens Exp $
|
25
|
|
|
|
|
|
|
#
|
26
|
|
|
|
|
|
|
#=======================================================================
|
27
|
|
|
|
|
|
|
package PDF::API3::Compat::API2::Basic::PDF::Number;
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
PDF::API3::Compat::API2::Basic::PDF::Number - Numbers in PDF. Inherits from L
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 METHODS
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut
|
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
1
|
|
34
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
38
|
1
|
|
|
1
|
|
5
|
use vars qw(@ISA);
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
39
|
1
|
|
|
1
|
|
5
|
no warnings qw[ deprecated recursion uninitialized ];
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
1
|
|
5
|
use PDF::API3::Compat::API2::Basic::PDF::String;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
145
|
|
42
|
|
|
|
|
|
|
@ISA = qw(PDF::API3::Compat::API2::Basic::PDF::String);
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 $n->convert($str)
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Converts a string from PDF to internal, by doing nothing
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub convert
|
52
|
0
|
|
|
0
|
1
|
|
{ return $_[1]; }
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 $n->as_pdf
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Converts a number to PDF format
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub as_pdf
|
62
|
0
|
|
|
0
|
1
|
|
{ $_[0]->{'val'}; }
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub outxmldeep
|
65
|
|
|
|
|
|
|
{
|
66
|
0
|
|
|
0
|
0
|
|
my ($self, $fh, $pdf, %opts) = @_;
|
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
$opts{-xmlfh}->print("".$self->val."\n");
|
69
|
|
|
|
|
|
|
}
|
70
|
|
|
|
|
|
|
|