use C4::Debug;
use C4::Creators::PDF;
-BEGIN {
- use version; our $VERSION = qv('1.0.0_1');
-}
# FIXME: Consider this style parameter verification instead...
# my %param = @_;
'printing_type',
'layout_name',
'guidebox',
+ 'oblique_title',
'font',
'font_size',
'callnum_split',
'format_string',
'layout_xml', # FIXME: all layouts should be stored in xml format to greatly simplify handling -chris_n
'creator',
+ 'units',
+ 'start_label',
);
if (scalar(@_) >1) {
my %given_params = @_;
return $exit_code;
}
+use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode itemcallnumber)];
sub new {
my $invocant = shift;
my $self = '';
my $type = ref($invocant) || $invocant;
if (grep {$_ eq 'Labels'} @_) {
$self = {
+ layout_xml => '',
+ units => 'POINT',
+ start_label => 1,
barcode_type => 'CODE39',
printing_type => 'BAR',
layout_name => 'DEFAULT',
guidebox => 0,
+ oblique_title => 1,
font => 'TR',
font_size => 3,
callnum_split => 0,
text_justify => 'L',
- format_string => 'title, author, isbn, issn, itemtype, barcode, callnumber',
+ format_string => join(', ', @{ PRESET_FIELDS() }),
@_,
};
}
push @params, $opts{'layout_id'}, $opts{'creator'};
}
if (scalar(@params) < 2) { # If there is no layout id or creator type then we cannot delete it
- warn sprintf('%s : Cannot delete layout as the profile id is invalid or non-existant.', $call_type) if !$params[0];
- warn sprintf('%s : Cannot delete layout as the creator type is invalid or non-existant.', $call_type) if !$params[1];
+ warn sprintf('%s : Cannot delete layout as the profile id is invalid or non-existent.', $call_type) if !$params[0];
+ warn sprintf('%s : Cannot delete layout as the creator type is invalid or non-existent.', $call_type) if !$params[1];
return -1;
}
my $query = "DELETE FROM creator_layouts WHERE layout_id = ? AND creator = ?";
my $textlimit = $params{'label_width'} - (( 3 * $params{'left_text_margin'} ) || 13.5 );
while ($strwidth < $textlimit) {
- $string .= '0';
+ $string .= '8'; # using '8' as filling char instead of '0'
$col_count++;
$strwidth = C4::Creators::PDF->StrWidth( $string, $self->{'font'}, $self->{'font_size'} );
}
CODE39MOD10 = Code 3 of 9 with modulo 10 checksum
=item .
- COOP2OF5 = A varient of 2 of 5 barcode based on NEC's "Process 8000" code
+ COOP2OF5 = A variant of 2 of 5 barcode based on NEC's "Process 8000" code
=item .
INDUSTRIAL2OF5 = The standard 2 of 5 barcode (a binary level bar code developed by Identicon Corp. and Computer Identics Corp. in 1970)