You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/04/05 05:25:12 UTC

DO NOT REPLY [Bug 49765] addPictures() not displaying Image in XWPF

https://issues.apache.org/bugzilla/show_bug.cgi?id=49765

--- Comment #14 from Huib <lo...@gmail.com> 2011-04-04 23:25:07 EDT ---
>From what I can tell, the following is not being generated in the
\word\document.xml:

<w:drawing>
    <wp:inline distT="0" distB="0" distL="0" distR="0">
        <wp:extent cx="2466975" cy="552450"/>
        <wp:docPr id="1" name="Picture 0" descr="generated.jpg"/>
        <a:graphic
xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
            <a:graphicData
uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
                <pic:pic
xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
                    <pic:nvPicPr>
                        <pic:cNvPr id="0" name="generated.jpg"/>
                        <pic:cNvPicPr/>
                    </pic:nvPicPr>
                    <pic:blipFill>
                        <a:blip r:embed="rId16"/>
                        <a:stretch>
                            <a:fillRect/>
                        </a:stretch>
                    </pic:blipFill>
                    <pic:spPr>
                        <a:xfrm>
                            <a:off x="0" y="0"/>
                            <a:ext cx="2466975" cy="552450"/>
                        </a:xfrm>
                        <a:prstGeom prst="rect">
                            <a:avLst/>
                        </a:prstGeom>
                    </pic:spPr>
                </pic:pic>
            </a:graphicData>
        </a:graphic>
    </wp:inline>
</w:drawing>

In the example above
Width: 2466975
Height: 552450
(with an EMU of 9525 per pixel; example above was 259 x 58 px)

rId16: is defined in \word\_rels\document.xml.rels
  <Relationship Id="rId16"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
Target="media/image1.jpeg"/>

But at least the image itself is correctly added to \word\media\image1.jpeg
(and also the relationship is correctly added)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org