views:

623

answers:

2

Hello,

I am working on a Silverlight web application that creates PDF documents. We want our clients to print these PDF documents but we do not want them to see it or save it locally.

Is there a way to send PDF data directly to client's printer without opening it in client's browser?

Please advice.

+2  A: 

No. Silverlight does not have access to any printer resources directly, only via javascript print functions.

blowdart
Thanks guys, I will not have control over the client's machines. So, I will investigate more on how to accomplish this task using JavaScript.
AlterWorld
+3  A: 

No -- Silverlight 3 does not support printing natively.

You can usually get some things done in the browser using Javascript, but that won't let you directly send a PDF the way you're discribing.

It's possible to write a seperate app that lives on the client machine and then integrate with that... For an internal line-of-business app that could be a good solution, but the obvious drawback is that you're stepping outside of Silverlight's multi-platform bubble.

Here's an article that might be worth looking at: http://jonas.follesoe.no/PrintingInSilverlight2UsingCSSAndASPNETAJAX4.aspx (the comments are also interesting, and some of them talk about working with PDFs)

Update: Silverlight 4 now supports this.

Brian MacKay
This was true for Silverlight 3 and earlier. Printing support has been added to Silverlight 4.
ChrisF