Forum


Replies: 1   Views: 3532
Creating a list with tabs
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 clio  · 03-05-2015 - 07:42

Hello, I'm trying to create a list with tabs as following: =============== 1. Tabbed text: .........................item 1 2. Item 2 3. Item 3 =============== By the following code: =============== $style = array( 'tabPositions' =>array( array('type' => 'right', 'leader' => 'dot', 'position' => 4000), ) ); $docx->createParagraphStyle('myStyle', $style); $text = array(); $text[] = array('text' => 'Tabbed text: '); $text[] = array('text' => 'item 1', 'tab' => true); $item = new WordFragment($docx); $item->addText($text, array('pStyle' => 'myStyle')); $docx->addList(array( $item, 'Item 2', 'Item 3' ), 'myListStyleDefinedBefore'); =============== However I got the following result: =============== 1. Tabbed text: item 1 2. Item 2 3. Item 3 =============== Is there any way to achieve this? Best regards, Henry