I have a simple word document with a table with two cells that contain A1 and A2 respectively (see https://ibb.co/pRS2xN1).
I need to
- Find the table-cell styling (background, border/borderWidth/borderColor) of the cells containing A1 and A2
- Find out the margins of the document (basically a getPageLayout() equivalent to modifyPageLayout())
Is this possible with phpdocx? Are there any examples on how to go about this?
I have been trying to use getWordStyles() but without much luck. Even using something as simple as:
$docx = new CreateDocxFromTemplate(resource_path('word/query_test.docx')); $referenceNode = array( 'type' => 'table-cell', ); print_r($docx->getWordStyles($referenceNode));
I would at least expect some output but I don't get anything. Also tried
$referenceNode = array( 'type' => 'table-cell', 'contains' => 'A1', );
Which would be my ideal solution of course but probably won't work as A1 itself is a paragraph and I would have to construct a query to search for table cell containing a paragraph that contains A1 instead. But as I don't get anything with just searching for type 'table-cell' I am not sure this is even possible.
Any help appreciated.