PostScript::Barcode - barcode writer
This document describes PostScript::Barcode version 0.004.
PostScript::Barcode
0.004
# This is abstract, do not use directly.
By itself alone, this role does nothing useful. Use one of the classes residing under this namespace.
data
Type Str, required attribute, data to be encoded into a barcode.
Str
pack_data
Type Bool, whether data is encoded into PostScript hex notation. Default is true.
Bool
move_to
Type 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.
PostScript::Barcode::Meta::Types::Tuple
[0, 0]
translate
Type PostScript::Barcode::Meta::Types::Tuple, vector by which the barcode position is shifted.
scale
Type PostScript::Barcode::Meta::Types::Tuple, vector by which the barcode is resized.
bounding_box
Type PostScript::Barcode::Meta::Types::TuplePair, coordinates of the EPS document bounding box.
PostScript::Barcode::Meta::Types::TuplePair
post_script_source_code
Returns EPS source code of the barcode as string.
render
$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.
a pair of Str and Value which results in a -key=value option
Value
-key=value
a pair of Str and Undef which disables a boolean option that was enabled by default by this module
Undef
a Str which enables a boolean option.
qw(-dBATCH -dEPSCrop -dNOPAUSE -dQUIET -dSAFER -gXXXxYYY -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".
qw(-dBATCH -dEPSCrop -dNOPAUSE -dQUIET -dSAFER -g
x
-dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=pngalpha -sOutputFile=-)
Nothing.
None.
PostScript::Barcode requires no configuration files or environment variables.
Perl 5.10, Module::Build
Perl 5.10, List::Util
Alien::BWIPP, Capture::Tiny, GSAPI, Moose, Moose::Role, Moose::Util::TypeConstraints, MooseX::Singleton
After version 0.003 the type constraint for "bounding_box" changed.
0.003
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.
Lars Dɪᴇᴄᴋᴏᴡ <daxim@cpan.org>
<daxim@cpan.org>
See file AUTHORS.
Copyright © 2010 Lars Dɪᴇᴄᴋᴏᴡ <daxim@cpan.org>
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.
rillian
irc://irc.freenode.net/ghostscript
To install PostScript::Barcode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PostScript::Barcode
CPAN shell
perl -MCPAN -e shell install PostScript::Barcode
For more information on module installation, please visit the detailed CPAN module installation guide.