We have been having issues with images in docx files not displaying once opened and saved with ASPOSE 5.2.
Steps to reproduce:
- Create new docx file with text and an image
- Opened docuement and then saved with no modifications
- Placed image on webserver using IIS 6.0
- Clicked on link on website that links to file, using IE 7
- When open/save dialog displays, we select Open (If you save then open the problem does not occur)
- When document opens the image is not show, there is an empty rectangle where the image should be
I compared the document.xml file from the origional file to the new file by extracting with winzip.
The following is different in the files and looks like it could be the cause:
Origional
<w:drawing>
<wp:inline distT="0" distB="0" distL="0" distR="0">
<wp:extent cx="5727700" cy="3605530" />
<wp:effectExtent l="19050" t="0" r="6350" b="0" />
<wp:docPr id="1" name="Picture 1" />
<wp:cNvGraphicFramePr>
<a:graphicFrameLocks xmlns:a=""<A href=" http: //schemas.openxmlformats.org/drawingml/2006/main">http://schemas.openxmlformats.org/drawingml/2006/main</A>" noChangeAspect="1"/>
</wp:cNvGraphicFramePr>
<a:graphic xmlns:a=""
<A href=" http: //schemas.openxmlformats.org/drawingml/2006/main">http://schemas.openxmlformats.org/drawingml/2006/main</A>">
<a:graphicData uri=""
<A href=" http: //schemas.openxmlformats.org/drawingml/2006/picture">http://schemas.openxmlformats.org/drawingml/2006/picture</A>">
<pic:pic xmlns:pic=""
<A href=" http: //schemas.openxmlformats.org/drawingml/2006/picture">http://schemas.openxmlformats.org/drawingml/2006/picture</A>">
<pic:nvPicPr>
<pic:cNvPr id="0" name="Picture 1" />
<pic:cNvPicPr>
<a:picLocks noChangeAspect="1" noChangeArrowheads="1" />
</pic:cNvPicPr>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId4" />
<a:srcRect />
<a:stretch>
<a:fillRect />
</a:stretch>
</pic:blipFill>
<pic:spPr bwMode="auto">
<a:xfrm>
<a:off x="0" y="0" />
<a:ext cx="5727700" cy="3605530" />
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst />
</a:prstGeom>
<a:noFill />
<a:ln w="9525">
<a:noFill />
<a:miter lim="800000" />
<a:headEnd />
<a:tailEnd />
</a:ln>
</pic:spPr>
</pic:pic>
</a:graphicData>
</a:graphic>
</wp:inline>
</w:drawing>
New
<w:pict>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path=""
<A href=" mailto:m@4@5l@4@11@9@11@9@5xe">m@4@5l@4@11@9@11@9@5xe</A>" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype>
<v:shape id="Picture 1" o:spid="_x0000_i1025" type="#_x0000_t75" style="width:451pt;height:283.9pt;mso-wrap-distance-left:0;mso-wrap-distance-top:0;mso-wrap-distance-right:0;mso-wrap-distance-bottom:0" o:bwmode="auto" filled="f" stroked="f" strokeweight="0.75pt">
<v:imagedata r:id="rId4" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shape>
</w:pict>
I replaced that section in the new file with the extract from the old file and the issue is fixed. However doing this is not a good solution as it requires manual intervention after every file is processed.