Line | |
---|
1 | <?php |
---|
2 | require_once('jpgraph/datamatrix/datamatrix.inc.php'); |
---|
3 | |
---|
4 | $data = 'The first datamatrix'; |
---|
5 | $encoder = DatamatrixFactory::Create(); |
---|
6 | $encoder->SetEncoding(ENCODING_ASCII); |
---|
7 | $backend = DatamatrixBackendFactory::Create($encoder); |
---|
8 | |
---|
9 | // We increase the module width to 3 pixels |
---|
10 | $backend->SetModuleWidth(3); |
---|
11 | |
---|
12 | try { |
---|
13 | $backend->Stroke($data); |
---|
14 | } catch (Exception $e) { |
---|
15 | echo 'Datamatrix error: '.$e->GetMessage()."\n"; |
---|
16 | exit(1); |
---|
17 | } |
---|
18 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.