![]() ![]() The solution I'm proposing here ( be aware of that!) is suitable only in some specific scenarios (typically: controlled line-of-business or enterprise situations) because: further reprinting (in case needed because of paper jams or other issues) will be driven completely by the application logic (for example, asking for further confirmations or further passwords and privileges for reprinting) and properly logged at the application level.I'm sure that only one copy will be printed after the user initiates the print operation.I'm sure that the application will print on the printer currently configured as the default printer.Moreover, as a programmer, you have no ways to know if the user changed some details in the Print dialog's options before confirming the print operation so not only are you unable to prevent him/her from making those modifications but also you can't actually know if some modifications occurred (in fact, neither the BeginPrintEventArgs nor the PrintPageEventArgs do carry this information).īecause I found myself exactly in this situation, I tried to find out a solution to guarantee the printing operation from Silverlight occurs in a silent way, that is: having the user initiating the print operation from the application without the need for him/her to interact with the Print dialog, and basically having the default Print dialog's options all auto-confirmed without the user intervention. Then the mandatory appearance of the Print dialog (as forced by Silverlight) looks like a big limitation. Of course, in this scenario, giving the user the ability to print more copies or to change the target printer is unwanted and to be avoided. Not only could this represent a click-once-more bother, but in some situations, it could represent a real issue.įor example, think about a controlled line-of-business scenario where the Silverlight application is used for a ticket counter: in order to deliver a ticket to the buyer, the user is expected to type in some data and then to print a ticket that should be printed once (and only once) to the default printer. ![]()
0 Comments
Leave a Reply. |