Image that is copied into the Clipboard using ExportToImage requires Paste Special to paste into Microsoft Word

4 posts, 0 answers
  1. Hamilton
    Hamilton avatar
    10 posts
    Member since:
    Jun 2011

    Posted 14 Jan 2015 Link to this post

    Hi there,

    We used ExportExtensions.ExportToImage (using both PngBitmapEncoder and BmpBitmapEncoder) to copy an image to the Clipboard.

    However, in order for us to paste this image into a Microsoft Word document, we need to do Paste Special -> Device Independent Bitmap.

    Is there anything I can do so that the normal Paste will just work?

    Regards,

    Tony
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 15 Jan 2015 Link to this post

    Hi Hamilton,

    The Silverlight framework does not have a built in Clipboard support for images. You can use the System.Windows.Clipboard only to set text. I guess you are using some library for this and perhaps you should ask the library owner for more information.

    If I am missing something, please give us more information. It is best if you can create a small project and send it to us so that we can examine what is going on. Note that we do not need your actual application, just the part with the clipboard and the chart.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Hamilton
    Hamilton avatar
    10 posts
    Member since:
    Jun 2011

    Posted 18 Jan 2015 in reply to Petar Marchev Link to this post

    Hi Petar,

    Apologies for not being clear with my original post, let me try and explain the issue again.

    We are currently using the Telerik ExportExtensions to convert a RadTileViewItem to an image as follows:
    ExportExtensions.ExportToImage(element, stream, new PngBitmapEncoder());

    Could you please advise how we could convert this to a jpeg image stream as the PngBitmapStream and BmpBitmapStream appear to be the only ones available?

    Thanks,

    Hamilton
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 19 Jan 2015 Link to this post

    Hello Hamilton,

    You are correct, we do not have a built-in jpeg encoder. We are not sure what this has in common with the original paste-function issue in MS Word. Perhaps if exporting to jpeg is a must, you can use some third party export-to-jpeg library.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top