PHP code example of olivierlb / phpdxf

1. Go to this page and download the library: Download olivierlb/phpdxf 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/ */

    

olivierlb / phpdxf example snippets


$dxf = new Creator(Creator::MILLIMETERS);
$dxf->setColor(Color::rgb(0, 100, 0))
    ->addEllipse(-20, 0, 0, -20, 30, 0, 0.5)
    ->setLayer('2', Color::MAGENTA, LineType::SOLID)
    ->addEllipseBy3Points(20, 0, 0, 20, 30, 0, 35, 0, 0)
    ->saveToFile(dirname(__FILE__) . '/demo3.dxf');