Thanks for the reply. Indexer doesn't return any information about placeholders - just their raw data and fake file names, no sizes are included unfortunately. This is all that's returned when using Indexer:
array:2 [
0 => array:2 [
"content" => b"""
ëPNG\r\n
image code here
"""
"path" => "media/image1.png"
]
1 => array:2 [
"content" => b"""
ëPNG\r\n
image code here
"""
"path" => "media/image2.png"
]
]
I can't use the options of replacePlaceholderImage because I don't know the width or height of the placeholder as the templates are user-editable, and 'auto' uses the replacement size (which might be many times larger than the placeholder).
Using getDocxPathQueryInfo only returns the following:
array:2 [
"length" => 1
"query" => "//w:drawing[descendant::wp:docPr[contains(@descr, "$FLOORPLAN$")]]"
]
which I can't use
The drawingChildNodes comes from DOMXPath right? But the code requires a DOMDocument which I don't know how to create from a template.