7

I require a way to print direct invoices to the printer without opening a print dialog to choose the printer.

Its basically for a restaurant sales application and I dont want the user to first preview the slip etc and then choose a printer ect.

I dont mind having to use a printing button on the UI of somesort, but the dialog is breaking my user experience.

I've also looked at Windows 8 Developer Preview Metro style app samples but only normal printing is explained and shown there.

Any help would be greatly appreciated.

svick
  • 236,525
  • 50
  • 385
  • 514
Dom
  • 71
  • 1
  • 3
  • 6
    I think one of the principles of WinRT is that your application doesn't have direct access to things like the filesystem or printers. The user is in control, not the application. So I don't think this is possible. – svick Feb 13 '12 at 17:22
  • 1
    @svick The filesystem is accessible but restricted to certain folders. Also it is possible to print from metro http://code.msdn.microsoft.com/windowsapps/Printing-9c25b3d3 – sarvesh Feb 13 '12 at 23:25
  • 1
    Thanks for the answer svick, If this is indeed the case then I cant see WinRT working for more serious applications, and then its just bassically a clone for android and iOS. – Dom Feb 14 '12 at 07:39
  • @iaimtomisbehave You dont read the question properbly, I'm not asking if its possible to print, I know it is. I'm wondering if it would be possible to print without a dialog asking details about the print, I need to set them in code behind and when the user clicks on print it should print immediately, no questions asked. – Dom Feb 14 '12 at 07:41
  • I don't want to publish my app on the WinStore, would be nice then if you could get full access to the API – Dom Feb 14 '12 at 08:03
  • @user1206159 I was responding to svick. WinRT doesn't have the API to do what you are looking for. If you don't want publish your app on the App store you can use any native calls in metro apps, they just won't pass certification. If you are not keen on publishing the app there may be a way to do this. What language are using? – sarvesh Feb 14 '12 at 18:08
  • Any update on this? I'm looking to do something similar. – earthling Sep 06 '13 at 15:58

2 Answers2

4

In the current release of WinRT there is no way to skip the printer selection screen, though the printer configuration screen can be sufficiently extended to include application-specific settings. The Print Sample illustrates how to make these customizations.

If the ability to skip printer selection is critical to your application, you will need to consider a classic desktop application in this release.

Jared Bienz - MSFT
  • 3,550
  • 17
  • 21
1

As a heads-up, the Chrome WinRT app is able to print without triggering the WinRT print dialog. Sadly, I'm not yet sure how it does that.

  • The default browser has special privileges: http://stackoverflow.com/questions/18540605/how-does-the-winrt-chrome-app-print-without-triggering-the-oss-print-dialog – Wolfgang Oct 26 '15 at 20:17