/var/www/hkosl.com/oneMotorChunHing_delete20240201/html/bctest.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require('bcclass/BCGFont.php');
require(
'bcclass/BCGColor.php');
require(
'bcclass/BCGDrawing.php');
require(
'bcclass/BCGcode128.barcode.php');

$font = new BCGFont('./bcclass/font/Arial.ttf'10);
$color_black = new BCGColor(000);
$color_white = new BCGColor(255255255);

$code = new BCGcode128();
$code->setScale(1);
$code->setThickness(20);
$code->setForegroundColor($color_black);
$code->setBackgroundColor($color_white);
$code->setFont($font);
$code->setStart('B');
$code->setTilde(true);
$code->parse($quotationno);

// Drawing Part
$drawing = new BCGDrawing('./barcode/'.$quotationno.'.jpg'$color_white);
$drawing->setBarcode($code);
$drawing->draw();

header('Content-Type: image/jpg');
$drawing->finish(BCGDrawing::IMG_FORMAT_JPEG);
?>
test
<img src="./barcode/<?=$quotationno?>.jpg">
test