This is a migrated thread and some comments may be shown as answers.

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

3 Answers 52 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Hamilton
Top achievements
Rank 1
Hamilton asked on 15 Jan 2015, 01:14 AM
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

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 15 Jan 2015, 10:36 AM
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.

 
0
Hamilton
Top achievements
Rank 1
answered on 18 Jan 2015, 10:22 PM
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
0
Petar Marchev
Telerik team
answered on 19 Jan 2015, 09:22 AM
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.

 
Tags
Chart
Asked by
Hamilton
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Hamilton
Top achievements
Rank 1
Share this question
or