2D Barcode 출력하기 tcPDF

먼저 barcode.php 파일을 만들고..
<?php

require_once('../tcpdf/tcpdf_barcodes_2d.php');

$type = "PDF417";

 if($_GET['text']) $text = $_GET['text']; else $text = "";

 $barcodeObj = new TCPDF2DBarcode($text,$type);

$barcodeObj->getBarcodePNG();

 ?>
2D Barcode를 생성하고 싶은 곳에
<img src="/barcode.php?text=your_code_here" />
로 이미지로 넣어주면 됨.

Popular Posts