1 package C4::Labels::PDF;
3 # Copyright 2009 Foundations Bible College.
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
23 use PDF::Reuse::Barcode;
26 use version; our $VERSION = qv('1.0.0_1');
37 my $type = ref($invocant) || $invocant;
40 _InitVars() if ($opts{InitVars} == 0);
41 _InitVars($opts{InitVars}) if ($opts{InitVars} > 0);
42 delete($opts{InitVars});
61 my $reference = shift;
62 prBookmark($reference);
67 my $directive = shift;
68 prCompress($directive);
79 my $directoryName = shift;
80 prDocDir($directoryName);
86 return prDocForm(%params);
91 my ($pdfFile, $pageNo, $oldInternalName) = @_;
92 return prExtract($pdfFile, $pageNo, $oldInternalName);
97 my ($fieldName, $value) = @_;
98 prField($fieldName, $value);
103 my $fontName = shift;
104 return prFont($fontName);
110 return prFontSize($size);
116 return prForm(%params);
121 return prGetLogBuffer();
127 prGraphState($string);
133 return prImage(%params);
138 my ($string, $duplicateCode) = @_;
139 prInit($string, $duplicateCode);
144 my ($imageFile, $width, $height) = @_;
145 return prJpeg($imageFile, $width, $height);
150 my $string_or_fileName = shift;
151 prJs($string_or_fileName);
168 my $directory = shift;
169 prLogDir($directory);
174 my ($lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY) = @_;
175 prMbox($lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY);
186 my ($file, $pageNumber) = @_;
187 return prSinglePage($file, $pageNumber);
192 my ($string, $font, $fontSize) = @_;
193 return prStrWidth($string, $font, $fontSize);
198 my ($x, $y, $string, $align, $rotation) = @_;
199 return prText($x, $y, $string, $align, $rotation);
205 return prTTFont($path);
211 PDF::Reuse::Barcode::Code128(%opts);
217 PDF::Reuse::Barcode::Code39(%opts);
223 PDF::Reuse::Barcode::COOP2of5(%opts);
229 PDF::Reuse::Barcode::EAN13(%opts);
235 PDF::Reuse::Barcode::EAN8(%opts);
241 PDF::Reuse::Barcode::IATA2of5(%opts);
247 PDF::Reuse::Barcode::Industrial2of5(%opts);
253 PDF::Reuse::Barcode::ITF(%opts);
259 PDF::Reuse::Barcode::Matrix2of5(%opts);
265 PDF::Reuse::Barcode::NW7(%opts);
271 PDF::Reuse::Barcode::UPCA(%opts);
277 PDF::Reuse::Barcode::UPCE(%opts);
286 C4::Labels::PDF - A class wrapper for PDF::Reuse and PDF::Reuse::Barcode to allow usage as a psuedo-object. For usage see
287 PDF::Reuse documentation and C4::Labels::PDF code.
293 Chris Nighswonger <cnighswonger AT foundations DOT edu>