1 package C4::Creators::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});
43 prDocDir($opts{'DocDir'}) if $opts{'DocDir'};
44 delete($opts{'DocDir'});
63 my $reference = shift;
64 prBookmark($reference);
69 my $directive = shift;
70 prCompress($directive);
82 return prDocForm(%params);
87 my ($pdfFile, $pageNo, $oldInternalName) = @_;
88 return prExtract($pdfFile, $pageNo, $oldInternalName);
93 my ($fieldName, $value) = @_;
94 prField($fieldName, $value);
100 return prFont($fontName);
106 return prFontSize($size);
112 return prForm(%params);
117 return prGetLogBuffer();
123 prGraphState($string);
129 return prImage(%params);
134 my ($string, $duplicateCode) = @_;
135 prInit($string, $duplicateCode);
140 my ($imageData, $width, $height, $imageFormat, $altImageData, $altImageWidth, $altImageHeight, $altImageFormat) = @_;
141 return prAltJpeg($imageData, $width, $height, $imageFormat, $altImageData, $altImageWidth, $altImageHeight, $altImageFormat);
146 my ($imageData, $width, $height, $imageFormat) = @_;
147 return prJpeg($imageData, $width, $height, $imageFormat);
152 my $string_or_fileName = shift;
153 prJs($string_or_fileName);
170 my $directory = shift;
171 prLogDir($directory);
176 my ($lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY) = @_;
177 prMbox($lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY);
188 my ($file, $pageNumber) = @_;
189 return prSinglePage($file, $pageNumber);
194 my ($string, $font, $fontSize) = @_;
195 return prStrWidth($string, $font, $fontSize);
200 my ($x, $y, $string, $align, $rotation) = @_;
201 return prText($x, $y, $string, $align, $rotation);
207 return prTTFont($path);
213 PDF::Reuse::Barcode::Code128(%opts);
219 PDF::Reuse::Barcode::Code39(%opts);
225 PDF::Reuse::Barcode::COOP2of5(%opts);
231 PDF::Reuse::Barcode::EAN13(%opts);
237 PDF::Reuse::Barcode::EAN8(%opts);
243 PDF::Reuse::Barcode::IATA2of5(%opts);
249 PDF::Reuse::Barcode::Industrial2of5(%opts);
255 PDF::Reuse::Barcode::ITF(%opts);
261 PDF::Reuse::Barcode::Matrix2of5(%opts);
267 PDF::Reuse::Barcode::NW7(%opts);
273 PDF::Reuse::Barcode::UPCA(%opts);
279 PDF::Reuse::Barcode::UPCE(%opts);
288 C4::Creators::PDF - A class wrapper for PDF::Reuse and PDF::Reuse::Barcode to allow usage as a psuedo-object. For usage see
289 PDF::Reuse documentation and C4::Creators::PDF code.
295 Chris Nighswonger <cnighswonger AT foundations DOT edu>