Lines 131-183
foreach my $item (@{$items}) {
Link Here
|
131 |
my ($barcode_llx, $barcode_lly, $barcode_width, $barcode_y_scale_factor) = 0,0,0,0; |
131 |
my ($barcode_llx, $barcode_lly, $barcode_width, $barcode_y_scale_factor) = 0,0,0,0; |
132 |
if ($layout->get_attr('printing_type') eq 'ALT') { # we process the ALT style printing type here because it is not an atomic printing type |
132 |
if ($layout->get_attr('printing_type') eq 'ALT') { # we process the ALT style printing type here because it is not an atomic printing type |
133 |
my $label_a = C4::Labels::Label->new( |
133 |
my $label_a = C4::Labels::Label->new( |
134 |
batch_id => $batch_id, |
134 |
batch_id => $batch_id, |
135 |
item_number => $item->{'item_number'}, |
135 |
item_number => $item->{'item_number'}, |
136 |
llx => $llx, |
136 |
llx => $llx, |
137 |
lly => $lly, |
137 |
lly => $lly, |
138 |
width => $template->get_attr('label_width'), |
138 |
width => $template->get_attr('label_width'), |
139 |
height => $template->get_attr('label_height'), |
139 |
height => $template->get_attr('label_height'), |
140 |
top_text_margin => $template->get_attr('top_text_margin'), |
140 |
top_text_margin => $template->get_attr('top_text_margin'), |
141 |
left_text_margin => $template->get_attr('left_text_margin'), |
141 |
left_text_margin => $template->get_attr('left_text_margin'), |
142 |
barcode_type => $layout->get_attr('barcode_type'), |
142 |
barcode_type => $layout->get_attr('barcode_type'), |
143 |
printing_type => 'BIB', |
143 |
printing_type => 'BIB', |
144 |
guidebox => $layout->get_attr('guidebox'), |
144 |
guidebox => $layout->get_attr('guidebox'), |
145 |
oblique_title => $layout->get_attr('oblique_title'), |
145 |
oblique_title => $layout->get_attr('oblique_title'), |
146 |
font => $layout->get_attr('font'), |
146 |
font => $layout->get_attr('font'), |
147 |
font_size => $layout->get_attr('font_size'), |
147 |
font_size => $layout->get_attr('font_size'), |
148 |
scale_width => $layout->get_attr('scale_width'), |
148 |
scale_width => $layout->get_attr('scale_width'), |
149 |
scale_height => $layout->get_attr('scale_height'), |
149 |
scale_height => $layout->get_attr('scale_height'), |
150 |
callnum_split => $layout->get_attr('callnum_split'), |
150 |
callnum_split => $layout->get_attr('callnum_split'), |
151 |
justify => $layout->get_attr('text_justify'), |
151 |
justify => $layout->get_attr('text_justify'), |
152 |
format_string => $layout->get_attr('format_string'), |
152 |
format_string => $layout->get_attr('format_string'), |
153 |
text_wrap_cols => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')), |
153 |
text_wrap_cols => $layout->get_text_wrap_cols( |
154 |
); |
154 |
label_width => $template->get_attr('label_width'), |
|
|
155 |
left_text_margin => $template->get_attr('left_text_margin') |
156 |
), |
157 |
); |
155 |
$pdf->Add($label_a->draw_guide_box) if $layout->get_attr('guidebox'); |
158 |
$pdf->Add($label_a->draw_guide_box) if $layout->get_attr('guidebox'); |
156 |
my $label_a_text = $label_a->create_label(); |
159 |
my $label_a_text = $label_a->create_label(); |
157 |
_print_text($label_a_text); |
160 |
_print_text($label_a_text); |
158 |
($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly); |
161 |
($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly); |
159 |
my $label_b = C4::Labels::Label->new( |
162 |
my $label_b = C4::Labels::Label->new( |
160 |
batch_id => $batch_id, |
163 |
batch_id => $batch_id, |
161 |
item_number => $item->{'item_number'}, |
164 |
item_number => $item->{'item_number'}, |
162 |
llx => $llx, |
165 |
llx => $llx, |
163 |
lly => $lly, |
166 |
lly => $lly, |
164 |
width => $template->get_attr('label_width'), |
167 |
width => $template->get_attr('label_width'), |
165 |
height => $template->get_attr('label_height'), |
168 |
height => $template->get_attr('label_height'), |
166 |
top_text_margin => $template->get_attr('top_text_margin'), |
169 |
top_text_margin => $template->get_attr('top_text_margin'), |
167 |
left_text_margin => $template->get_attr('left_text_margin'), |
170 |
left_text_margin => $template->get_attr('left_text_margin'), |
168 |
barcode_type => $layout->get_attr('barcode_type'), |
171 |
barcode_type => $layout->get_attr('barcode_type'), |
169 |
printing_type => 'BAR', |
172 |
printing_type => 'BAR', |
170 |
guidebox => $layout->get_attr('guidebox'), |
173 |
guidebox => $layout->get_attr('guidebox'), |
171 |
oblique_title => $layout->get_attr('oblique_title'), |
174 |
oblique_title => $layout->get_attr('oblique_title'), |
172 |
font => $layout->get_attr('font'), |
175 |
font => $layout->get_attr('font'), |
173 |
font_size => $layout->get_attr('font_size'), |
176 |
font_size => $layout->get_attr('font_size'), |
174 |
scale_width => $layout->get_attr('scale_width'), |
177 |
scale_width => $layout->get_attr('scale_width'), |
175 |
scale_height => $layout->get_attr('scale_height'), |
178 |
scale_height => $layout->get_attr('scale_height'), |
176 |
callnum_split => $layout->get_attr('callnum_split'), |
179 |
callnum_split => $layout->get_attr('callnum_split'), |
177 |
justify => $layout->get_attr('text_justify'), |
180 |
justify => $layout->get_attr('text_justify'), |
178 |
format_string => $layout->get_attr('format_string'), |
181 |
format_string => $layout->get_attr('format_string'), |
179 |
text_wrap_cols => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')), |
182 |
text_wrap_cols => $layout->get_text_wrap_cols( |
180 |
); |
183 |
label_width => $template->get_attr('label_width'), |
|
|
184 |
left_text_margin => $template->get_attr('left_text_margin') |
185 |
), |
186 |
); |
181 |
$pdf->Add($label_b->draw_guide_box) if $layout->get_attr('guidebox'); |
187 |
$pdf->Add($label_b->draw_guide_box) if $layout->get_attr('guidebox'); |
182 |
my $label_b_text = $label_b->create_label(); |
188 |
my $label_b_text = $label_b->create_label(); |
183 |
($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly); |
189 |
($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly); |
Lines 186-212
foreach my $item (@{$items}) {
Link Here
|
186 |
else { |
192 |
else { |
187 |
} |
193 |
} |
188 |
my $label = C4::Labels::Label->new( |
194 |
my $label = C4::Labels::Label->new( |
189 |
batch_id => $batch_id, |
195 |
batch_id => $batch_id, |
190 |
item_number => $item->{'item_number'}, |
196 |
item_number => $item->{'item_number'}, |
191 |
llx => $llx, |
197 |
llx => $llx, |
192 |
lly => $lly, |
198 |
lly => $lly, |
193 |
width => $template->get_attr('label_width'), |
199 |
width => $template->get_attr('label_width'), |
194 |
height => $template->get_attr('label_height'), |
200 |
height => $template->get_attr('label_height'), |
195 |
top_text_margin => $template->get_attr('top_text_margin'), |
201 |
top_text_margin => $template->get_attr('top_text_margin'), |
196 |
left_text_margin => $template->get_attr('left_text_margin'), |
202 |
left_text_margin => $template->get_attr('left_text_margin'), |
197 |
barcode_type => $layout->get_attr('barcode_type'), |
203 |
barcode_type => $layout->get_attr('barcode_type'), |
198 |
printing_type => $layout->get_attr('printing_type'), |
204 |
printing_type => $layout->get_attr('printing_type'), |
199 |
guidebox => $layout->get_attr('guidebox'), |
205 |
guidebox => $layout->get_attr('guidebox'), |
200 |
oblique_title => $layout->get_attr('oblique_title'), |
206 |
oblique_title => $layout->get_attr('oblique_title'), |
201 |
font => $layout->get_attr('font'), |
207 |
font => $layout->get_attr('font'), |
202 |
font_size => $layout->get_attr('font_size'), |
208 |
font_size => $layout->get_attr('font_size'), |
203 |
scale_width => $layout->get_attr('scale_width'), |
209 |
scale_width => $layout->get_attr('scale_width'), |
204 |
scale_height => $layout->get_attr('scale_height'), |
210 |
scale_height => $layout->get_attr('scale_height'), |
205 |
callnum_split => $layout->get_attr('callnum_split'), |
211 |
callnum_split => $layout->get_attr('callnum_split'), |
206 |
justify => $layout->get_attr('text_justify'), |
212 |
justify => $layout->get_attr('text_justify'), |
207 |
format_string => $layout->get_attr('format_string'), |
213 |
format_string => $layout->get_attr('format_string'), |
208 |
text_wrap_cols => $layout->get_text_wrap_cols(label_width => $template->get_attr('label_width'), left_text_margin => $template->get_attr('left_text_margin')), |
214 |
text_wrap_cols => $layout->get_text_wrap_cols( |
209 |
); |
215 |
label_width => $template->get_attr('label_width'), |
|
|
216 |
left_text_margin => $template->get_attr('left_text_margin') |
217 |
), |
218 |
); |
210 |
$pdf->Add($label->draw_guide_box) if $layout->get_attr('guidebox'); |
219 |
$pdf->Add($label->draw_guide_box) if $layout->get_attr('guidebox'); |
211 |
$label->{'barcode'} = $item->{'item_number'} if ($from and $to); |
220 |
$label->{'barcode'} = $item->{'item_number'} if ($from and $to); |
212 |
my $label_text = $label->create_label(); |
221 |
my $label_text = $label->create_label(); |