PHP code example of nielsiano / dmpl-builder

1. Go to this page and download the library: Download nielsiano/dmpl-builder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nielsiano / dmpl-builder example snippets

 php
$builder = new Nielsiano\DmplBuilder();

$builder->penUp()
        ->plot(200, 200)
        ->penDown()
        ->velocity(100)
        ->flexCut()
        ->plot(0, 1400)
        ->plot(1900, 0)
        ->plot(0, -1400)
        ->plot(-1900, 0)
        ->penUp()
        ->cutOff();

return $builder->compile();
 php
echo ';: ECM,U H L0,P0;A100,100,V10;BP50;D,0,1400,1900,0,e' > /dev/usb/lp0