Forum


Replies: 3   Views: 5840
Text indentation
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by jadeglobal  · 06-02-2012 - 14:30

Is there a way to indent text and tables/images?

[img]http://img717.imageshack.us/img717/6126/textindent.png[/img]

Posted by admin  · 11-04-2013 - 12:13

Hello,

Please use 'indent_left' parameter on texts and 'indent_left' on images.
Example 1:

$text = 'Lorem ipsum dolor sit amet.';

$paramsText = array(
'b' => 'single',
'font' => 'Arial',
'indent_left' => 300
);

$docx->addText($text, $paramsText);

Example 2:

$paramsImg = array(
'name' => '../../files/img/image.png',
'scaling' => 50,
'spacingTop' => 100,
'spacingBottom' => 0,
'spacingLeft' => 100,
'spacingRight' => 0,
'textWrap' => 0,
'border' => 1,
'borderDiscontinuous' => 1,
);

$docx->addImage($paramsImg);

Regards.

Posted by jadeglobal  · 11-04-2013 - 12:13

If I justify the text, the indent goes away! Any workaround?