.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Barcode::DataMatrix::PNG 3pm" .TH Barcode::DataMatrix::PNG 3pm "2020-05-17" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Barcode::DataMatrix::PNG \- Generate PNG graphical representations of Data Matrix barcodes .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 8 \& use Barcode::DataMatrix::PNG; \& my $data = Barcode::DataMatrix::PNG\->new\->(barcode=>\*(Aqtest_barcode\*(Aq); \& # Minimal call for a new object. \& $data\->encode(); # Encode the Barcode data. \& $data\->render(); # Default: Render the image to \& $data\->target = \*(Aqpass\*(Aq; # C the image. \& my $barcode = $data\->render(); # Return a PNG representation of a DataMatrix Barcode. \& my $my_barcode = $data\->echo_barcode(); # Return a human\-readable string of the encoded data. \& \& $data\->barcode = "A new barcode."; # To render a new barcode with the same object. \& $data\->target = \*(Aqstdout\*(Aq; \& $data\->encode(); \& $data\->render(); # etc. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class is used to create graphical representations of data matrix barcodes. It is an extension of the Barcode::DataMatrix class. Potential applications include graphically oriented documents such as \s-1PDF,\s0 printable web documents, invoices, packing lists, shipping labels, etc.... .SH "METHODS" .IX Header "METHODS" .SS "new (%attributes)" .IX Subsection "new (%attributes)" Minimal initiation of a barcode object is new(barcode=>\*(L"yourtext\*(R"). Options may be added via the \f(CW%attributes\fR in any order. .PP Default settings of output to \f(CW\*(C`STDOUT\*(C'\fR with a resolution of 3 pixels will be used unless changed. .SS "encode ()" .IX Subsection "encode ()" Encode the barcode string into DataMatrix format. An \f(CW\*(C`encode()\*(C'\fR must be completed prior to rendering a barcode. .SS "render ()" .IX Subsection "render ()" Render a \s-1PNG\s0 image of the created barcode. The graphic will be rendered based on settings selected. .PP An exception may be thrown by foundation classes if they are unable to generate the barcode data or graphics. .SS "\fBecho_barcode()\fP" .IX Subsection "echo_barcode()" Echo a human-readable representation of the barcode data stored in \f(CW$this\fR\->{\*(L"barcode\*(R"} .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "barcode" .IX Subsection "barcode" Ascii string data to be inserted into the barcode. .SS "resolution" .IX Subsection "resolution" The resolution (in pixels) of the barcode to be generated. The default setting is \f(CW3\fR pixels resolution. .SS "target" .IX Subsection "target" Default output is \f(CW\*(C`stdout\*(C'\fR. Options are \f(CW\*(C`stdout\*(C'\fR or \f(CW\*(C`pass\*(C'\fR. Pass will \f(CW\*(C`return()\*(C'\fR the barcode \s-1PNG\s0 data for use. .SH "AUTHOR" .IX Header "AUTHOR" Kasem Omary<< >> .SH "SOURCE REPOSITORY" .IX Header "SOURCE REPOSITORY" .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "HTML::Barcode::DataMatrix" 4 .IX Item "HTML::Barcode::DataMatrix" .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2014 the AUTHORs listed above. .PP This program is free software; you can redistribute it and/or modify it under the terms of either: the \s-1GNU\s0 General Public License as published by the Free Software Foundation; or the Artistic License. .PP See http://dev.perl.org/licenses/ for more information.