line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PDF::Template::Constants; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
5
|
use Exporter (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use vars qw(@ISA @EXPORT_OK); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
80
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
15
|
@ISA = qw(Exporter); |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
269
|
@EXPORT_OK = qw( |
13
|
|
|
|
|
|
|
%PointsPer |
14
|
|
|
|
|
|
|
%Verify |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# This is a list of conversions from various units of measure to points. |
19
|
|
|
|
|
|
|
# The key will be the first letter of the unit. |
20
|
|
|
|
|
|
|
our %PointsPer = ( |
21
|
|
|
|
|
|
|
I => 72.27, # Inches |
22
|
|
|
|
|
|
|
P => 1, # Points |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
$PointsPer{C} = ($PointsPer{I} / 2.54); # Centimeters |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#GGG Add: |
27
|
|
|
|
|
|
|
# PDFTemplate properties (to go with %NoSetProperty) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our %Verify = ( |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#GGG This also needs improvement ... Not all available fonts are listed |
32
|
|
|
|
|
|
|
'FACE' => { |
33
|
|
|
|
|
|
|
'__DEFAULT__' => 'Times-Bold', |
34
|
|
|
|
|
|
|
( map { $_ => 1 } qw( |
35
|
|
|
|
|
|
|
Courier Courier-Bold Courier-Oblique Courier-BoldOblique |
36
|
|
|
|
|
|
|
Helvetica Helvetica-Bold Helvetica-Oblique Helvetica-BoldOblique |
37
|
|
|
|
|
|
|
Times-Roman Times-Bold Times-Italic Times-BoldItalic |
38
|
|
|
|
|
|
|
Symbol ZapfDingbats |
39
|
|
|
|
|
|
|
)), |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
'ALIGN' => { |
43
|
|
|
|
|
|
|
'__DEFAULT__' => 'left', |
44
|
|
|
|
|
|
|
#GGG Add a full-justify option - this requires a lot of coding prowess |
45
|
|
|
|
|
|
|
( map { $_ => 1 } qw( |
46
|
|
|
|
|
|
|
center left right |
47
|
|
|
|
|
|
|
)), |
48
|
|
|
|
|
|
|
}, |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
'OPENACTION' => { |
51
|
|
|
|
|
|
|
'__DEFAULT__' => 'fitpage', |
52
|
|
|
|
|
|
|
( map { $_ => 1 } qw( |
53
|
|
|
|
|
|
|
fitbox fitheight fitpage fitwidth retain |
54
|
|
|
|
|
|
|
)), |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
'OPENMODE' => { |
58
|
|
|
|
|
|
|
'__DEFAULT__' => 'none', |
59
|
|
|
|
|
|
|
( map { $_ => 1 } qw( |
60
|
|
|
|
|
|
|
bookmarks fullscreen none thumbnails |
61
|
|
|
|
|
|
|
)), |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Pagesize is specified in points |
65
|
|
|
|
|
|
|
'PAGESIZE' => { |
66
|
|
|
|
|
|
|
'__DEFAULT__' => 'A4', |
67
|
|
|
|
|
|
|
'Letter' => { |
68
|
|
|
|
|
|
|
PAGE_WIDTH => 8.5 * $PointsPer{I}, |
69
|
|
|
|
|
|
|
PAGE_HEIGHT => 11 * $PointsPer{I}, |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
'Legal' => { |
72
|
|
|
|
|
|
|
PAGE_WIDTH => 8.5 * $PointsPer{I}, |
73
|
|
|
|
|
|
|
PAGE_HEIGHT => 14 * $PointsPer{I}, |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
'A0' => { |
76
|
|
|
|
|
|
|
PAGE_WIDTH => 2380, |
77
|
|
|
|
|
|
|
PAGE_HEIGHT => 3368, |
78
|
|
|
|
|
|
|
}, |
79
|
|
|
|
|
|
|
'A1' => { |
80
|
|
|
|
|
|
|
PAGE_WIDTH => 1684, |
81
|
|
|
|
|
|
|
PAGE_HEIGHT => 2380, |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
'A2' => { |
84
|
|
|
|
|
|
|
PAGE_WIDTH => 1190, |
85
|
|
|
|
|
|
|
PAGE_HEIGHT => 1684, |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
'A3' => { |
88
|
|
|
|
|
|
|
PAGE_WIDTH => 1190, |
89
|
|
|
|
|
|
|
PAGE_HEIGHT => 842, |
90
|
|
|
|
|
|
|
}, |
91
|
|
|
|
|
|
|
'A4' => { |
92
|
|
|
|
|
|
|
PAGE_WIDTH => 595, |
93
|
|
|
|
|
|
|
PAGE_HEIGHT => 842, |
94
|
|
|
|
|
|
|
}, |
95
|
|
|
|
|
|
|
}, |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |
99
|
|
|
|
|
|
|
__END__ |