opensoft/epl
最新稳定版本:1.0.2
Composer 安装命令:
composer require opensoft/epl
包简介
The library is a php wrapper for the EPL2 Programming Language. At present do not support all commands EPL2.
README 文档
README
The library is a php wrapper for the EPL2 Programming Language. At present do not support all commands EPL2.
Usage:
<?php use Epl\CommandComposite; use Epl\CommandHelper; $composite = new Composite(); $commandHelper = new CommandHelper($composite); //Draw new line $commandHelper->lineDrawBlack(50, 200, 400, 20); //Draw other line $commandHelper->lineDrawBlack(200, 50, 20, 400); //Print 1 label $commandHelper->print(1); //Get EPL string $eplString = $commandHelper->toEplString();
To implement the commands necessary to implement Epl\CommandInterface.
For convenience of use EPL commands there is a CommandHelper. It hides the implementation EPL commands. But you can direct way to instantiate the command.
<?php use Epl\Command\PrintCommand; use Epl\Command\CommandComposite; $commandComposite = new CommandComposite(); $printCommand = new PrintCommand(1); $commandComposite->addCommand($printCommand); $eplString = $commandComposite->toEplString();
Installation
php composer.phar require opensoft/epl
Installation on Symfony 2 project
If you use a deps file, add:[epl]
git=http://github.com/opensoft/epl.git
Or if you want to clone the repos:
git clone git://github.com/opensoft/epl.git vendor/epl
Add the namespace to your autoloader
$loader->registerNamespaces(array(
............
'Epl' => DIR.'/../vendor/epl/src',
...........
));
List of commands
| EPL | Description | Status | Class | Helper Method |
|---|---|---|---|---|
| A | ASCII Text | Partial | Epl\Command\Image\AsciiTextCommand | asciiText |
| AUTOFR | Automatic Form Printing | Not implemented | ||
| B | Bar Code | Complete | Epl\Command\Image\BarCodeCommand | barCode |
| B | RSS-14 Bar Code | Complete | Epl\Command\Image\Rss14BarCodeCommand | rss14BarCode |
| b | 2D Data Matrix Bar Code | Complete | Epl\Command\Image\DataMatrixBarCodeCommand | dataMatrixBarCode |
| D | Density | Complete | Epl\Command\Stored\DensityCommand | density |
| I | Character Set Selection | Complete | Epl\Command\Stored\CharacterSetSelectionCommand | characterSetSelection |
| JB | Disable Top Of Form Backup | Complete | Epl\Command\Stored\DisableTopOfFormBackupCommand | disableTopOfFormBackup |
| JC | Disable Top Of Form Backup - All Cases | Complete | Epl\Command\Stored\DisableTopOfFormBackupAllCasesCommand | disableTopOfFormBackupAllCases |
| JF | Enable Top Of Form Backup | Complete | Epl\Command\Stored\EnableTopOfFormBackupCommand | enableTopOfFormBackup |
| LE | Line Draw Exclusive OR | Complete | Epl\Command\Image\LineDrawExclusiveORCommand | lineDrawExclusiveOR |
| LO | Line draw black | Complete | Epl\Command\Image\LineDrawBlackCommand | lineDrawBlack |
| LS | Line draw diagonal | Complete | Epl\Command\Image\LineDrawDiagonalCommand | lineDrawDiagonal |
| LW | Line draw white | Complete | Epl\Command\Image\LineDrawWhiteCommand | lineDrawWhite |
| N | Clear Image Buffer | Complete | Epl\Command\Image\ClearImageBufferCommand | clearImageBuffer |
| O | Options Select | Complete | Epl\Command\Stored\HardwareOptionCommand | hardwareOption |
| P | Complete | Epl\Command\PrintCommand | printLabel | |
| PA | Print Automatic | Complete | Epl\Command\Form\PrintAutomaticCommand | printAutomatic |
| q | Set Form Width | Complete | Epl\Command\Stored\SetFormWidthCommand | setFormWidth |
| Q | Set Form Length | Complete | Epl\Command\Stored\SetFormLengthCommand | setFormLength |
| S | Speed Select | Complete | Epl\Command\Stored\SpeedCommand | speed |
| X | Box Draw | Complete | Epl\Command\Image\BoxDrawCommand | boxDraw |
| GW | Direct Graphic Write | Complete | Epl\Command\Image\GraphicWriteCommand | graphicWrite |
| ; | Code comment line | Complete | Epl\Command\Form\CommentLineCommand | commentLine |
统计信息
- 总下载量: 18.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-02-18