Forum


Replies: 8   Views: 1931
Transform documents to text
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 kobbe  · 12-02-2020 - 13:07

Sorry, some follow up questions.

I sucessfully get all the styles using getWordStyles, and I also got all text content using getWordContents. But I do not understand how I will match the content with the style. 

If I filter the styles using "contains" the same content could come multiplie times, so I wont know what is what then.

Example:

$referenceNode = [
   'type' => 'paragraph',
   'contains' => 'test text'
];
$styles = $docx->getWordStyles($referenceNode);

"test text" might match mutliplie paragraphs.

 

Hoping for advice :)