Hi,
I wanted to Export my silverlight page which has more than 1 telerik chart's into pdf. Can anyone suggest me on how to achieve this. attached is a sample of my silverlight page.
You can use the approach demonstrated in this example here to export any FrameworkElement to PDF image with RadDocument (in the example the chart content is first exported to image, and then it is added in the RadDocument as ImageInline). You can use the Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(...) extension method to export the framework element that wraps the 3 gauges in your application to image and proceed in the same way as in the example.
Hi ,
I use the Telerik RadControls for Silverlight and I have the following use case:
- The Application is able to export Framework Elements as Pdf file,
using the OpenDialog class . Its page on the Pdf file is a rendered
Image of each Framework Element. To do that I use the Telerik Function
for exporting to Pdf. This function has the following signature: void
Export(Raddocument document, Filestream stream). In this function the
parameter document is the generated Pdf document and stream is the
Filestream from the opendialog class.
- When the stream is written to the Hard disk after the User hits the Ok
button in the Open Dialog the UI Window of my Silverlight application
freezes for a while ( the time it needs for writing the file on the
disk) .
- I tried to use the Background calss and/or the Dispatcher class , but I got Security exceptions...
- What can I do , so that the time it needs for the Stream to be written
on the Disk , an indicator informs the user with update progress
without freezing the silverlight UI ?
0
Accepted
Giuseppe
Telerik team
answered on 07 Dec 2011, 10:45 AM
Hi Nik,
Unfortunately running the export in a background worker thread to avoid UI freeze would not be possible as this operation is strongly tied to the UI thread and cannot be executed elsewhere due to security & cross-thread restrictions.
Best wishes,
Giuseppe
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>