none
OpenXml Image padding RRS feed

  • Question

  • I used OpenXML to insert two images inside a picture content control. The images are added successfully but there is no gap in between. What i want is just adding some padding/margin around the picture so that there is a gap in between two pictures. I see the distL, distR attributes in inline node and i tried to modify the values but no effect. Anyone has any idea?

    Here is a portion of my document.xml:

            <w:p w:rsidR="00916F4F" w:rsidP="00916F4F" w:rsidRDefault="00916F4F">
              <w:r>
                <w:rPr>
                  <w:noProof />
                </w:rPr>
                <w:drawing>
                  <wp:inline distT="0" distB="0" distL="0" distR="0">
                    <wp:extent cx="1905000" cy="1905000" />
                    <wp:effectExtent l="0" t="0" r="0" b="0" />
                    <wp:docPr id="3" name="Zio09241188-ae66-4c34-8d0e-c3fc90e98bce" />
                    <wp:cNvGraphicFramePr />
                    <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="Zio09241188-ae66-4c34-8d0e-c3fc90e98bce" />
                            <pic:cNvPicPr />
                          </pic:nvPicPr>
                          <pic:blipFill>
                            <a:blip r:embed="rId8" cstate="print" />
                            <a:stretch>
                              <a:fillRect />
                            </a:stretch>
                          </pic:blipFill>
                          <pic:spPr>
                            <a:xfrm>
                              <a:off x="0" y="0" />
                              <a:ext cx="1905000" cy="1905000" />
                            </a:xfrm>
                            <a:prstGeom prst="rect">
                              <a:avLst />
                            </a:prstGeom>
                          </pic:spPr>
                        </pic:pic>
                      </a:graphicData>
                    </a:graphic>
                  </wp:inline>
                </w:drawing>
              </w:r>
              <w:r>
                <w:rPr>
                  <w:noProof />
                </w:rPr>
                <w:drawing>
                  <wp:inline distT="0" distB="0" distL="0" distR="0">
                    <wp:extent cx="1905000" cy="1905000" />
                    <wp:effectExtent l="0" t="0" r="0" b="0" />
                    <wp:docPr id="3" name="Zio09241188-ae66-4c34-8d0e-c3fc90e98bce" />
                    <wp:cNvGraphicFramePr />
                    <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="Zio09241188-ae66-4c34-8d0e-c3fc90e98bce" />
                            <pic:cNvPicPr />
                          </pic:nvPicPr>
                          <pic:blipFill>
                            <a:blip r:embed="rId8" cstate="print" />
                            <a:stretch>
                              <a:fillRect />
                            </a:stretch>
                          </pic:blipFill>
                          <pic:spPr>
                            <a:xfrm>
                              <a:off x="0" y="0" />
                              <a:ext cx="1905000" cy="1905000" />
                            </a:xfrm>
                            <a:prstGeom prst="rect">
                              <a:avLst />
                            </a:prstGeom>
                          </pic:spPr>
                        </pic:pic>
                      </a:graphicData>
                    </a:graphic>
                  </wp:inline>
                </w:drawing>
              </w:r>
            </w:p>
    Thursday, September 23, 2010 11:15 PM