Can't display wmetafile8 images

7 posts, 0 answers
  1. Brian
    Brian avatar
    5 posts
    Member since:
    Sep 2013

    Posted 23 Sep 2015 Link to this post

    I've got hundreds of thousands of RTF files with embedded images that use the {\pict\wmetafile8 tag.  When I load them into the radRichTextBox, the images won't display (I see a red 'X' broken image link icon).

    Is there any way I can get them to display or is there I way I could programmatically alter RTF files to manipulate the images into a format the radRichTextBox can handle?  I am ok if the solution causes a loss of some quality on the images.

  2. Todor
    Admin
    Todor avatar
    168 posts

    Posted 28 Sep 2015 Link to this post

    Hi Brian,

    You are correct the reason images are not rendered is that they are actually WMF images. Those images are not supported out-of-the-box from RadRichTextBox.

    The good news is that we have a demo in our SDK repository on GitHub which demonstrates how to implement an image decoder for that image format. You can find the demo here. Please note, the demo has a reference only to the DocxFormatProvider assembly. In order to test it with a Rtf file, you should add a reference to the Telerik.Windows.Documents.FormatProviders.Rtf dll as well. 

    I hope this helps.
    If you have further questions, I'll be glad to assist you.

    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Brian
    Brian avatar
    5 posts
    Member since:
    Sep 2013

    Posted 30 Sep 2015 in reply to Todor Link to this post

    Thanks - this is exactly what we needed, it seems to have solved the problem perfectly!
  5. Shankar Ram
    Shankar Ram avatar
    2 posts
    Member since:
    Mar 2015

    Posted 19 Feb in reply to Brian Link to this post

    doesn't work for me still - the red 'X' broken image link icon persists. Don't get any errors, though. Could it have to do with the size (1920 x 1080)? Am able to save the png onto the file system without a problem.

    The decoder's decode gets hit correctly when I call the Import on the RtfFormatProvider object.

    Really driving me crazy :) Any pointers would be awesome. 

  6. Todor
    Admin
    Todor avatar
    168 posts

    Posted 24 Feb Link to this post

    Hi Shankar Ram,

    Can you isolate the issue in a sample project and send it to us or at least send us the image which cannot be rendered? In this way, it will be much easier for us to find what might cause the problem and try to solve it.

    Looking forward to your reply.

    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Shankar Ram
    Shankar Ram avatar
    2 posts
    Member since:
    Mar 2015

    Posted 24 Feb in reply to Todor Link to this post

    sure -hmm, unfortunately unable to attach the original wmf , neither the png (size > 2 MB). Please send me an email address where I can send the files to.

    Thanks for having a look!

  8. Todor
    Admin
    Todor avatar
    168 posts

    Posted 24 Feb Link to this post

    Hi Shankar Ram,

    The public forums don't allow attachments other than images which cover the requirements as you already mentioned, so it would be best if you open a support ticket through your Telerik account and to attach the image or the project there. 

    Please excuse me I didn't share that information in my previous post.

    Regards,
    Todor
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready