如何在xml word文档中对齐pic和文本

时间:2015-09-06 20:26:01

标签: c# xml winforms

*你好我的代码我需要将文本右对齐和顶部以及图像中心对齐

<w:drawing> <wp:inline distT="0" distB="0" distL="0" distR="0"> <wp:extent cx="3238500" cy="2609850"/> <wp:effectExtent l="19050" t="0" r="0" b="0"/> <wp:docPr id="1" name="Picture 0" descr="lms.gif"/>

我需要将文本标题右上角和徽标对齐 这个标题词doc 我正在使用Open XML word文档

1 个答案:

答案 0 :(得分:0)

                                          中央                       中央                                                                                                                                                                 

                <wp:cNvGraphicFramePr>
                    <a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/>
                </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="lms.gif"/>
                                <pic:cNvPicPr/>
                            </pic:nvPicPr>
                            <pic:blipFill>
                                <a:blip r:embed="rId1"/>
                                <a:stretch>
                                    <a:fillRect/>
                                </a:stretch>
                            </pic:blipFill>
                            <pic:spPr>
                                <a:xfrm>
                                    <a:off x="0" y="0"/>
                                    <a:ext cx="3238500" cy="2609850"/>
                                </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:rsidR="00A65029">
        <w:t>kdjfdfjkdfjkfdjkfdjkdfjkdfkjdfjkdfjkdfkjdfقية</w:t>
    </w:r>


</w:p>
<w:p w:rsidR="00A65029" w:rsidRDefault="00A65029">
    <w:pPr>
        <w:pStyle w:val="Header"/>
    </w:pPr>
</w:p>