none
How to add an image to a word processing document using SXLT. RRS feed

  • Question

  • I am using an .xslt file to generate a docx file. I have a link of a picture in sxlt which can be found by using <xsl:value-of select="pic"/>. I used this value and successfully generated picture in a html table. There I used code like 

        <img>
               <xsl:attribute name="src"><xsl:value-of select="pic"/></xsl:attribute>
               <xsl:attribute name="type"><xsl:value-of select="concat('data:image/gif;base64,',xPath)"/></xsl:attribute>
               </img>

    Now I want to show the image in a docx file which is generated using wordprocessingml. Any help or suggestions would be much appreciated.

    -Nahid Shah

    Tuesday, November 19, 2013 10:18 PM

All replies

  • Hi,

    >>Now I want to show the image in a docx file which is generated using wordprocessingml.

    You can inert a picture into a word processing document using OpenXml SDK,and you can refer to the MSDN example about add image in a word document.

    #How to: Insert a picture into a word processing document (Open XML SDK)

    http://msdn.microsoft.com/en-us/library/office/bb497430.aspx


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 20, 2013 11:54 AM
    Moderator