View | Details | Raw Unified | Return to bug 18541
Collapse All | Expand All

(-)a/C4/Patroncards/Patroncard.pm (-4 / +43 lines)
Lines 28-33 use C4::Creators::Lib qw(get_font_types get_unit_values); Link Here
28
use C4::Creators::PDF qw(StrWidth);
28
use C4::Creators::PDF qw(StrWidth);
29
use C4::Patroncards::Lib qw(unpack_UTF8 text_alignment leading box get_borrower_attributes);
29
use C4::Patroncards::Lib qw(unpack_UTF8 text_alignment leading box get_borrower_attributes);
30
30
31
=head1 NAME
32
33
C4::Patroncards::Patroncard
34
35
=head1 SYNOPSIS
36
37
    use C4::Patroncards::Patroncard;
38
39
    # Please extend
40
41
42
=head1 DESCRIPTION
43
44
   This module allows you to ...
45
46
=head1 FUNCTIONS
47
48
=head2 new
49
50
=cut
31
51
32
sub new {
52
sub new {
33
    my ($invocant, %params) = @_;
53
    my ($invocant, %params) = @_;
Lines 62-67 sub new { Link Here
62
    return $self;
82
    return $self;
63
}
83
}
64
84
85
=head2 draw_barcode
86
87
=cut
88
65
sub draw_barcode {
89
sub draw_barcode {
66
    my ($self, $pdf) = @_;
90
    my ($self, $pdf) = @_;
67
    # Default values for barcode scaling are set in constructor to work with pre-existing installations
91
    # Default values for barcode scaling are set in constructor to work with pre-existing installations
Lines 79-84 sub draw_barcode { Link Here
79
    );
103
    );
80
}
104
}
81
105
106
=head2 draw_guide_box
107
108
=cut
109
82
sub draw_guide_box {
110
sub draw_guide_box {
83
    my ($self, $pdf) = @_;
111
    my ($self, $pdf) = @_;
84
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
112
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
Lines 93-98 sub draw_guide_box { Link Here
93
    $pdf->Add($obj_stream);
121
    $pdf->Add($obj_stream);
94
}
122
}
95
123
124
=head2 draw_guide_grid
125
126
=cut
127
96
sub draw_guide_grid {
128
sub draw_guide_grid {
97
    my ($self, $pdf) = @_;
129
    my ($self, $pdf) = @_;
98
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
130
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
Lines 165-170 sub draw_guide_grid { Link Here
165
    $pdf->Text( $self->{'llx'} + $self->{'width'} - $strtop_len , $self->{'lly'} + $self->{'height'} - $font_size , $strtop );
197
    $pdf->Text( $self->{'llx'} + $self->{'width'} - $strtop_len , $self->{'lly'} + $self->{'height'} - $font_size , $strtop );
166
}
198
}
167
199
200
=head2 draw_text
201
202
=cut
168
203
169
sub draw_text {
204
sub draw_text {
170
    my ($self, $pdf, %params) = @_;
205
    my ($self, $pdf, %params) = @_;
Lines 268-273 sub draw_text { Link Here
268
    }
303
    }
269
}
304
}
270
305
306
=head2 draw_image
307
308
=cut
309
271
sub draw_image {
310
sub draw_image {
272
    my ($self, $pdf) = @_;
311
    my ($self, $pdf) = @_;
273
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
312
    warn sprintf('No pdf object passed in.') and return -1 if !$pdf;
Lines 288-293 sub draw_image { Link Here
288
    }
327
    }
289
}
328
}
290
329
330
=head2 draw_barcode
331
332
=cut
333
291
sub _draw_barcode {   # this is cut-and-paste from Label.pm because there is no common place for it atm...
334
sub _draw_barcode {   # this is cut-and-paste from Label.pm because there is no common place for it atm...
292
    my $self = shift;
335
    my $self = shift;
293
    my %params = @_;
336
    my %params = @_;
Lines 370-375 __END__ Link Here
370
Chris Nighswonger <cnighswonger AT foundations DOT edu>
413
Chris Nighswonger <cnighswonger AT foundations DOT edu>
371
414
372
=cut
415
=cut
373
374
375
376
- 

Return to bug 18541