PostScript::Barcode - barcode writer
This document describes
# This is abstract, do not use directly.
By itself alone, this role does nothing useful. Use one of the classes residing under this namespace:
See "THE TYPES" in Moose::Manual::Types about the type names.
Str, required attribute, data to be encoded into a barcode.
Bool, whether data is encoded into PostScript hex notation. Default is true.
PostScript::Barcode::Meta::Types::Tuple, position where the barcode is placed initially. Default is
[0, 0], which is the lower left hand of a document.
Maybe[PostScript::Barcode::Meta::Types::Tuple], vector by which the barcode position is shifted. Default is
undef, no position shifting.
Maybe[PostScript::Barcode::Meta::Types::Tuple], vector by which the barcode is resized. Default is
undef, no size scaling.
PostScript::Barcode::Meta::Types::TuplePair, coordinates of the EPS document bounding box. Default values are automatically determined through the Ghostscript
bbox device, see http://ghostscript.com/doc/current/Devices.htm#Bounding_box_output.
Returns EPS source code of the barcode as string.
$barcode->render; # use defaults, see below $barcode->render(-sDEVICE => 'epswrite'); $barcode->render(-sDEVICE => 'pdfwrite'); $barcode->render(-sDEVICE => 'svg');
Most of the time the simple examples above are sufficient.
$barcode->render(-sDEVICE => 'pnggray', -sOutputFile => 'out.png',); # overrides some default values $barcode->render(-dEPSCrop => undef, -g => undef,); # disables some default values
Takes an list of initialisation arguments. The argument names start with a dash, see the explanation at "init_with_args" in GSAPI and http://ghostscript.com/doc/current/Use.htm#Invoking. Renders and writes the barcode image binary data to the specified file name.
Valuewhich results in a
Undefwhich disables a boolean option that was enabled by default by this module
Strwhich enables a boolean option.
qw(-dBATCH -dEPSCrop -dNOPAUSE -dQUIET -dSAFER -gXXX
-dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=pngalpha -sOutputFile=-), meaning the barcode is rendered as transparent PNG with anti-aliasing to STDOUT, with the image size automatically taken from the "bounding_box".
PostScript::Barcode requires no configuration files or environment variables.
Perl 5.10, Module::Build
Perl 5.10, List::Util
0.003 the type constraint for "bounding_box" changed.
No bugs have been reported.
Please report any bugs or feature requests to http://github.com/daxim/PostScript-Barcode/issues, or send an email to the maintainer.
Suggest more future plans by filing a bug.
See file AUTHORS.
Copyright © 2010 Lars Dɪᴇᴄᴋᴏᴡ
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0.
This library is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
I wish to thank
rillian on Freenode. Without your help, I would not have got this project off the ground.