News

Draw lines with PHPdocx 2.3

  • Jun 06, 2011

This information is outdated, please, refer to the adShape documentation for up to date info.
Do you need to draw a line into your Word document?
You can easily do it witf PHPDocX using this code:


require_once '../../classes/CreateDocx.inc';

$docx = new CreateDocx();
// At this moment only "line" is available, future version will add circles, squares, arrows and more
$type = 'line';

$paramsShape = array(
'width' => 300,
'height' => 500
);

$docx->addShape($type, $paramsShape);

$docx->createDocx('example_shape');