SVG::Barcode::Code128 - Generator for SVG based Code 128 barcodes
use SVG::Barcode::Code128; my %params = ( background => 'white', foreground => 'black', lineheight => 30, linewidth => 2, margin => 10, textsize => 10, ); my $code128 = SVG::Barcode::Code128->new(\%params); my $svg = $code128->plot('https://perldoc.pl'); my $svg2 = $code128->param(foreground => 'red')->plot('https://perldoc.pl'); # use as function use SVG::Barcode::Code128 'plot_code128'; my $svg = plot_code128('https://perldoc.pl', \%params);
SVG::Barcode::Code128 is a generator for SVG based Code 128 barcodes.
use SVG::Barcode::Code128 'plot_code128'; my $svg = plot_code128($text, \%params);
Returns a Code 128 barcode using the provided text and parameters.
$code128 = SVG::Barcode::Code128->new(\%params); $code128 = SVG::Barcode::Code128->new; # create with defaults
Creates a new Code 128 plotter. Inherited from "new" in SVG::Barcode.
Accepted parameters are:
Color of the background. Default 'white'.
'white'
Color of the dots. Default 'black'.
'black'
Height of the lines. Default 30.
30
Width of a single line. Default 2.
2
Margin around the code. Default 10.
10
Size of the text at the bottom of the code. 0 means no text. Default 10.
0
Getter and setter for the parameters. Inherited from "param" in SVG::Barcode.
Creates a SVG code. Inherited from "plot" in SVG::Barcode.
SVG::Barcode, Barcode::Code128.
© 2019 by Tekki (Rolf Stöckli).
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install SVG::Barcode::Code128, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVG::Barcode::Code128
CPAN shell
perl -MCPAN -e shell install SVG::Barcode::Code128
For more information on module installation, please visit the detailed CPAN module installation guide.