I am trying to load an image programmatically on to a Libreoffice Writer document.
Instead of the image displaying, it is the code that displays:
$xml = <<<IMG
<draw:frame draw:name="$filenamefromodf" text:anchor-type=“aschar” svg:width="{$width}cm" svg:height="{$height}cm" draw:z-index=“3”>
<draw:image xlink:href=“testpic1.jpg” xlink:type=“simple” xlink:show=“embed” xlink:actuate=“onLoad” draw:mime-type=“image/jpg”/>
</draw:frame>
IMG;
So, what displays is this:
<draw:frame draw:name="$filenamefromodf" text:anchor-type=“aschar” svg:width="{$width}cm" svg:height="{$height}cm" draw:z-index=“3”>
<draw:image xlink:href=“testpic1.jpg” xlink:type=“simple” xlink:show=“embed” xlink:actuate=“onLoad” draw:mime-type=“image/jpg”/>
</draw:frame>
Instead of ‘xlink:href=“testpic1.jpg”’ I have also tried ‘xlink:href=“extracteddestination/Pictures/100000000000002B0000002E30BAD18A830F9794.jpg”’.
But to no avail.
Version: 7.3.6.2 (x64) / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL
[https://www.myeas.co.uk/s1/Documents/propertydocs/brochures/Arbor%20Estates/brochurerent1ArborEstates.odt]
(https://www.myeas.co.uk/s1/Documents/propertydocs/brochures/Arbor%20Estates/brochurerent1ArborEstates.odt)