Printing in Silverlight

What are my print options in Silverlight 3? Suppose I have this wonderful Silverlight application / control that creates a graphical display of some data. Now the user wants to print it.

I looked at a few options, but I still have to check them out. Before I do this, I would like to get some feedback on how this can be done.

  • Use the capabilities of the browser to print. In my experience, this does not provide useful print, but maybe with some interaction between the Silverlight host and the browser, can this be done?

  • Use WriteableBitmap. The image can be recorded locally, but this requires user interaction or sent to a server where a suitable file can be generated (for example, a PDF file), and then sent back to the browser. Unfortunately, now you get the overhead of sending an image twice over the network and increased complexity on the server side.

  • Send XAML back to the server, which is then displayed in the WPF application running on the server. As a result, the client returns. I'm not sure if this is possible at all, but if this is the network overhead less than in option 2. Unfortunately, the server-side complexity is even higher.

  • Wait for Silverlight 4?

One thing I examined is that my awesome control will probably have ScrollViewerthe highest level, but the user will want to print all the content of the control, not just what is visible inside the borders ScrollViewer. How can I handle this extra complexity?

+3
source share
5 answers

Take a look at SmartPrint for Silverlight 3: http://www.smartwebcontrols.com/SmartPrintDetails.aspx

+2
source

, , - , Silverlight 4, . SL 4, , . PDC , - Silverlight . ​​

+3

TBH : -

  • . , , - , . - , .

  • WriteableBitmap. , . , , . , , ( , Silverlight?).

  • XAML . , WPF XAML SL XAML, , XAML , , XAML, XAML ? SL, SL.

  • Silverlight 4, , ( ), SL4 .

Silverlight ( , ). , , .

, , . , , , SL.

+2

- - , , Silverlight.

, - (.. ) -, .

+1

Sliverlight 3 .

silverlight 4, " "

Writeablebitmap: http://www.andybeaulieu.com/Home/tabid/67/EntryID/161/Default.aspx

+1

Source: https://habr.com/ru/post/1721817/


All Articles