none
Add vector image inside docx RRS feed

  • Question

  • Hello,

    We need to find a better way of generating images that are added to Word documents (.docx).

    The images are created from WPF Geometries, containing some texts too.

    Currently, our code render these geometries as bitmap (.png) images and add them to the document. But this is no good for large documents.

    We think that creating vector images instead of rasterized ones is the way to go.

    What would be the best approach to convert from WPF Geometries to something I can add to .docx documents?

    Thank you,

    Igor. 


    .NET Software developer for industrial internet and automation system.

    Monday, June 29, 2015 7:46 PM

Answers

  • Hi lgor,

    >>What would be the best approach to convert from WPF Geometries to something I can add to .docx documents?<<

    As far as I know, the Word applicaiton support the Graphic file types below:

    File type                  

    File format                  

    BMP

    Windows bitmap

    EMF

    Windows Enhanced Metafile

    EMZ

    Compressed Windows Enhanced Metafile

    EPS

    Encapsulated PostScript

    FPix, FPX

    FlashPix

    GIF

    Graphics Interchange Format

    JPEG, JFIF, JPEG-2000

    Joint Photographic Experts Group

    PDF

    Portable Document Format

    PICT, PCT

    Macintosh Picture

    PNG

    Portable Network Graphics

    PNTG

    Macintosh Paint

    PSD

    Photoshop Document

    QTIF

    QuickTime Image Format

    SGI

    Silicon Graphics Incorporated

    TGA, TPIC

    Targa

    TIFF, TIF

    Tagged Image File Format

    WMF

    Windows Metafile

    WMZ

    Compressed Windows Metafile

    If the type of vector images you are handling belongs one of types above, we can insert the images to the document using Open XML. To achieve the goal, we can insert the images manually and reflect the code using XML SDK 2.5 Productivity Tool for getting started.

    If you have problem saving the images from WPF Geometries, I suggest that you reopen a new thread in WPF forum.

    In addition, here is the helpful link that Graphic file types you can insert and save:

    Graphic file types you can insert and save

    Regards & Fei


    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.

    Tuesday, June 30, 2015 7:27 AM
    Moderator

All replies

  • Hi lgor,

    >>What would be the best approach to convert from WPF Geometries to something I can add to .docx documents?<<

    As far as I know, the Word applicaiton support the Graphic file types below:

    File type                  

    File format                  

    BMP

    Windows bitmap

    EMF

    Windows Enhanced Metafile

    EMZ

    Compressed Windows Enhanced Metafile

    EPS

    Encapsulated PostScript

    FPix, FPX

    FlashPix

    GIF

    Graphics Interchange Format

    JPEG, JFIF, JPEG-2000

    Joint Photographic Experts Group

    PDF

    Portable Document Format

    PICT, PCT

    Macintosh Picture

    PNG

    Portable Network Graphics

    PNTG

    Macintosh Paint

    PSD

    Photoshop Document

    QTIF

    QuickTime Image Format

    SGI

    Silicon Graphics Incorporated

    TGA, TPIC

    Targa

    TIFF, TIF

    Tagged Image File Format

    WMF

    Windows Metafile

    WMZ

    Compressed Windows Metafile

    If the type of vector images you are handling belongs one of types above, we can insert the images to the document using Open XML. To achieve the goal, we can insert the images manually and reflect the code using XML SDK 2.5 Productivity Tool for getting started.

    If you have problem saving the images from WPF Geometries, I suggest that you reopen a new thread in WPF forum.

    In addition, here is the helpful link that Graphic file types you can insert and save:

    Graphic file types you can insert and save

    Regards & Fei


    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.

    Tuesday, June 30, 2015 7:27 AM
    Moderator
  • Hello,

    Thank you for the reply,

    In fact I still did not choose a vector format among those you mentioned.

    My question is exactly wich format (vector based) is more straight forward to convert from XAML.

    From XAML to a raster format is easy... the issue here is vector based formats.

    Igor.


    .NET Software developer for industrial internet and automation system.

    Tuesday, June 30, 2015 8:43 PM
  • Hi Igor,

    >>From XAML to a raster format is easy... the issue here is vector based formats.<<

    This forum is for developers discussing developing issues using Open XML SDK. For converting XAML to the vector based formats, I suggest that you reopen a thread in WPF forum since there are more exptectors who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Regards & Fei


    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, July 1, 2015 2:21 AM
    Moderator