locked
How to effect direct printing in WinRT

    Question

  • Hello, this basic question has been answered two years ago. The short answer is that there is no way to avoid the print dialog in WinRT apps. However, many things have changed since 2012, and are still changing. I am hoping for an update, or at least a new way to circumvent this crippling limitation.

    I have a popular photo booth app in the Windows Store called Instant Photo Booth. It is used by thousands of users all over the world. Everyone from parents wanting to host to birthday party to professional photo booth operators use it for their events. It has been promoted by Microsoft in the store three times.

    The app offers a completely unattended photo booth experience EXCEPT for printing. The app operates as a beautiful kiosk until the user wants to print and then, in a jarring transition, it becomes a personal Windows 8 machine in that it forces the user interact with the system via the print dialog.

    In WPF, one simply calls Print() on a properly configured PrintDocument and the default printer jumps to life. Will there ever be an API this direct and simple for WinRT? If it is not on your list, please consider adding it!

    Barring the addition of that API, can anyone suggest a way to automate printing from WinRT? Could the WinRT app trigger a service? Any suggestions? Please help!

    Thank you!


    Thaine Norris

    Thursday, July 17, 2014 2:44 PM

Answers

  • You can post feature requests at the Windows Platform UserVoice http://wpdev.uservoice.com and others who also need it can vote for it. Include the scenario you have that cannot be achieved through the existing API. A naked request is much less likely to be accepted than one which has a compelling reason.

    --Rob

    Thursday, July 17, 2014 7:52 PM
    Owner

All replies

  • If your app is side loaded (probably for a kiosk scenario) then you can use a brokered windows runtime component to interop with a desktop module which can direct print.

    See http://msdn.microsoft.com/en-us/library/windows/apps/dn630195.aspx

    Thursday, July 17, 2014 3:09 PM
    Owner
  • That is an interesting solution.

    But the primary market for Instant Photo Booth is the average Windows Store user wanting a photo booth for a birthday party or wedding (the two most reported scenarios). Side-loading is not a viable solution for a typical user for reasons of both cost and complexity.

    Can you think of another way that would work for a true Windows Store app for the typical user who running any flavor of the OS?


    Thaine Norris

    Thursday, July 17, 2014 3:46 PM
  • No. There is no real way for a store-deployed app to print directly without user intervention.

    You may be able to finesse this by not printing from the app but sending data to a web service on a different system which does the actual printing.

    --Rob


    Thursday, July 17, 2014 4:55 PM
    Owner
  • Licensing of sideloading changed and not that espensive anymore so maybe sideloading is an option now

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, July 17, 2014 5:34 PM
  • Yes it is much better. But it's still $100 and requires RT, Pro or Enterprise, and a special installation procedure. So it is not a viable solution for Jane Low Power User who bought a Tablet at Best Buy and sees a nifty photo booth app they would like to use at a birthday party.


    Thaine Norris

    Thursday, July 17, 2014 5:38 PM
  • Thanks Rob,

    Hopefully the Windows team will see fit to put that simple feature back in for the future. It really is a crippling blow to an otherwise fantastic environment.

    Your suggestion is a good one. We have actually written a simple WPF utility that watches the Instant Photo Booth folders for new images and sends them to the printer. This works well, but can't work on RT, and is only for the power user.

    We are hoping that one day we can have a completely integrated solution. You know, the way it should work.


    Thaine Norris

    Thursday, July 17, 2014 5:42 PM
  • You can post feature requests at the Windows Platform UserVoice http://wpdev.uservoice.com and others who also need it can vote for it. Include the scenario you have that cannot be achieved through the existing API. A naked request is much less likely to be accepted than one which has a compelling reason.

    --Rob

    Thursday, July 17, 2014 7:52 PM
    Owner