Posted By: John Papa | Jul 1st @ 1:30 PM | 57,226 Views | 8 Comments

In this episode, Pete Brown discusses the printing API in Silverlight 4 and demonstrates his recent printing exploits. Pete shows John how, using the API, he created a printing library that serves as a report writer. The source code is available on codeplex (link is below).  


Relevant links:

Follow us on Twitter @SilverlightTV or on the web at http://silverlight.tv
Rating:
1
0
ivan_
ivan_
g

Very interesting.

 

Do users need special permissions to install printing support?

Can regular user (who can only install ClickOnce apps) print using this library?

Does it require XPS printer driver?

can printing support be used to print any else from silverlight, besides the reports you mentioned?

 

For example: Microsoft Report Viewer control doesn't install printing support by default. The first time somebody tries to print it asks to install and most of the user in our network are not able to do so. So we ended up converting reports to something printable.  

 

Thanks!

Psychlist1972
Psychlist1972
Pete Brown [MSFT]

@ivan_

 

Nothing special is required. This is all Silverlight code that works in the sandbox as well as in elevated trust. No special drivers are required. If the user can print from a web page, they can print from Silverlight.

 

There are limitations here, though, compared to "real" reporting solutions. This is not a good approach for large reports due to the bitmap approach. Great for small stuff Smiley

 

In normal trust/sandboxed, printing must be started via a user-initiated event like a button click.

 

Pete

ivan_
ivan_
g

Great! Thanks. I will need to try.

Can I feed-in images from SQL Server reporting service reports into this? 

Or rather report pages rendered as images.

Psychlist1972
Psychlist1972
Pete Brown [MSFT]

This isn't really a SQL Server Reporting Services - level report writer. This is more for collections of info that make very short reports. Maybe some images, probably not graphs right now as I don't run through to ensure animations wrap up.

 

Not sure what you'll be able to do with SSRS in the short term, but for the long term, I'll make sure talk to the SSRS team and add your voice to the folks that are looking for a Silverlight solution.

 

Pete

Psychlist1972
Psychlist1972
Pete Brown [MSFT]

Mr Papa

 

Your avatar has more hair than mine. I've seen your head. Actually, I'm pretty sure I've seen the ceiling reflected in it too Wink

 

Something is deeply wrong here Smiley

ccatto
ccatto
Catto

Hey Now Silverlight #35,

 

     Great Vid on Printing!

 

Thx 4 the info,

Catto

silverlight did not supporting Large Print Page sizes like a0  

Microsoft Communities