Hello,
There's no option to match Indexer and getDocxPathQueryInfo output, but you can use the following method to get the image size from getDocxPathQueryInfo
$referenceNode = array( 'customQuery' => '//w:drawing//wp:docPr', );
$contents = $docx->getDocxPathQueryInfo($referenceNode);
foreach ($contents['elements'] as $content) {
// get descr
echo $content->getAttribute('descr') . PHP_EOL;;
// get height and width
$size = $content->parentNode->getElementsByTagNameNS('http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing', 'extent');
if ($size->length > 0) {
echo $size->item(0)->getAttribute('cx') . PHP_EOL; // width
echo $size->item(0)->getAttribute('cy') . PHP_EOL; // height
}
}
Images use EMUs as unit values, you can transform them to inches or cms using the following code:
'height_word_emus' => $heightImage,
'width_word_emus' => $widthImage,
'height_word_inches' => $heightImage/914400,
'width_word_inches' => $widthImage/914400,
'height_word_cms' => $heightImage/360000,
'width_word_cms' => $widthImage/360000,
Regards.