source:
trunk/xgraph/jpgraph/Examples/datamatrix_ex1.php
Last change on this file was 42, checked in by , 10 years ago | |
---|---|
File size: 444 bytes |
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.