Ejemplo n.º 1
0
             //
             include_once 'lib\\barcode\\code128.class.php';
             $thistext = htmlspecialchars($myrow[0]);
             //
             // FIXME: (AJH) The font could be an issue, as we have no idea where the fonts reside.
             // If windows, the above should work, if Linux, anything might happen.
             // I should fix this by standardising this and the disk usage font, or including a local font.
             //
             $thisfont = 'c:\\windows\\fonts\\verdana.ttf';
             $thisimagename = 'barcode.png';
             $barcode = new phpCode128($thistext, 120, $thisfont, 18);
             $barcode->setBorderWidth(1);
             $barcode->setBorderSpacing(10);
             $barcode->setPixelWidth(1);
             $barcode->setEanStyle(true);
             $barcode->setShowText(true);
             $barcode->setAutoAdjustFontSize(true);
             $barcode->setTextSpacing(5);
             //                $barcode->setEanStyle(false);
             //                $barcode->setShowText(true);
             $barcode->saveBarcode($thisimagename);
             echo "<img src='" . $thisimagename . "'><tr>";
             //
         }
     }
 } else {
     echo htmlspecialchars($query_array["name"]);
 }
 if (isset($_REQUEST["headline_addition"])) {
     echo htmlspecialchars($_REQUEST["headline_addition"]);
 }
Ejemplo n.º 2
0
echo "<h3>Not using EAN style</h3>";
echo "<p>setEanStyle set to false</p>";
echo '<pre>
	$barcode->setBorderWidth(2);
	$barcode->setBorderSpacing(10);
	$barcode->setPixelWidth(2);
	$barcode->setEanStyle(false);
	$barcode->setShowText(true);
	$barcode->setAutoAdjustFontSize(true);
	$barcode->setTextSpacing(5);
</pre>';
echo "<img src='4.png'>";
echo "<hr />";
$barcode = new phpCode128('mikeleigh.com', 150, 'c:\\windows\\fonts\\verdana.ttf', 18);
$barcode->setEanStyle(false);
$barcode->setShowText(false);
$barcode->saveBarcode('5.png');
echo "<h3>Not using EAN style and hiding the text</h3>";
echo "<p>setEanStyle and setShowText set to false</p>";
echo '<pre>
	$barcode->setBorderWidth(2);
	$barcode->setBorderSpacing(10);
	$barcode->setPixelWidth(2);
	$barcode->setEanStyle(false);
	$barcode->setShowText(false);
	$barcode->setAutoAdjustFontSize(true);
	$barcode->setTextSpacing(5);
</pre>';
echo "<img src='5.png'>";
echo "<hr />";
$barcode = new phpCode128('mikeleigh.com', 150, 'c:\\windows\\fonts\\verdana.ttf', 18);