Line | |
---|
1 | <?php
|
---|
2 | require_once('jpgraph/datamatrix/datamatrix.inc.php');
|
---|
3 |
|
---|
4 | $data = '123456';
|
---|
5 |
|
---|
6 | $encoder = DatamatrixFactory::Create();
|
---|
7 | $backend = DatamatrixBackendFactory::Create($encoder);
|
---|
8 | $backend->SetModuleWidth(3);
|
---|
9 |
|
---|
10 | // Create the barcode from the given data string and write to output file
|
---|
11 | try {
|
---|
12 | $backend->Stroke($data);
|
---|
13 | } catch (Exception $e) {
|
---|
14 | $errstr = $e->GetMessage();
|
---|
15 | echo "Datamatrix error message: $errstr\n";
|
---|
16 | }
|
---|
17 |
|
---|
18 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.