Send barcode as SVG image object to the standard output.
public getBarcodeSVG ( $w = 2, $h = 30, $color = 'black' ) | ||
$w | (int) Minimum width of a single bar in user units. | |
$h | (int) Height of barcode in user units. | |
$color | (string) Foreground color (in SVG format) for bar elements (background is transparent). |
// // TCPDF 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. // See the GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with TCPDF. If not, see <http://www.gnu.org/licenses/>. // // See LICENSE.TXT file for more information. // ------------------------------------------------------------------- // // Description : Example for tcpdf_barcodes_1d.php class // //============================================================+ /** * @file * Example for tcpdf_barcodes_1d.php class * @package com.tecnick.tcpdf * @author Nicola Asuni * @version 1.0.000 */ // include 1D barcode class require_once dirname(__FILE__) . '/../../tcpdf_barcodes_1d.php'; // set the barcode content and type $barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128'); // output the barcode as SVG image $barcodeobj->getBarcodeSVG(2, 30, 'black'); //============================================================+ // END OF FILE //============================================================+