NAME
SVG::Barcode::EAN13
VERSION
version 0.9
SYNOPSIS
use SVG::Barcode::EAN13;
my $ean13 = SVG::Barcode::EAN13->new;
my $svg = $ean13->plot('1234567890128');
$ean13->linewidth; # 1
$ean13->lineheight; # 50
$ean13->textsize; # 10
# from SVG::Barcode:
$ean13->foreground; # black
$ean13->background; # white
$ean13->margin; # 2
$ean13->id;
$ean13->class;
$ean13->width;
$ean13->height;
$ean13->scale;
my %params = (
lineheight => 40,
textsize => 0,
);
$ean13 = SVG::Barcode::EAN13->new(%params);
# use as function
use SVG::Barcode::EAN13 'plot_ean13';
my $svg = plot_ean13('1234567890128', %params);
DESCRIPTION
SVG::Barcode::EAN13 is a generator for SVG based EAN13 barcodes.
NAME
SVG::Barcode::EAN13 - Generator for SVG based EAN13 barcodes
FUNCTIONS
plot_ean13
use SVG::Barcode::EAN13 'plot_ean13';
$svg = plot_ean13($text, %params);
Returns a EAN13 barcode using the provided text and parameters.
CONSTRUCTOR
new
$ean13 = SVG::Barcode::EAN13->new; # create with defaults
$ean13 = SVG::Barcode::EAN13->new(\%params);
Creates a new EAN13 plotter. Inherited from SVG::Barcode.
METHODS
plot
Creates a SVG code. Inherited from SVG::Barcode.
PARAMETERS
Inherited from SVG::Barcode: background, class, foreground, height, id, margin, scale, width.
lineheight
$value = $ean13->lineheight;
$ean13 = $ean13->lineheight($newvalue);
$ean13 = $ean13->lineheight(''); # 30
Getter and setter for the height of a line. Default 30
.
linewidth
$value = $ean13->linewidth;
$ean13 = $ean13->linewidth($newvalue);
$ean13 = $ean13->linewidth(''); # 1
Getter and setter for the width of a single line. Default 1
.
textsize
$value = $ean13->textsize;
$ean13 = $ean13->textsize($newvalue);
$ean13 = $ean13->textsize(''); # 10
Getter and setter for the size of the text a the bottom. 0
hides the text. Default 10
.
AUTHOR & COPYRIGHT
Derived from SVG::Barcode::UPCA
© 2025 by bwarden (Brett T. Warden).
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
SEE ALSO
SVG::Barcode, GD::Barcode::EAN13.
AUTHOR
bwarden
COPYRIGHT AND LICENSE
This software is Copyright (c) 2025 by bwarden@cpan.org.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)