Question: Printing in WinUI 3 Desktop
See original GitHub issueHi all
I’m looking for guidance on printing from WinUI 3 Desktop please.
I tried the PrintHelper
from Community Toolkit 8 preview 4 and get a System.Runtime.InteropServices.COMException: 'Interface not registered (0x80040155)'
I put this down to issues with getting the Windows.Graphics.Printing.PrintManager
as reported in #4375 and #4363.
So I suppose I’m trying to answer a few questions:
- Is the PrintManager + PrintDocument combination going to be the preferred printing technique for WinUI 3 Desktop (as per UWP)
- If not what is plan for WinUI 3 Desktop?
- Is there a vision of when the capability will be available? there’s nothing Print specific on the roadmap at the moment
- Has anyone found workarounds/solutions to getting printing working in Preview 4?
I would welcome any thoughts, pointers etc. please. I know there’s a huge amount of working going on to get the controls working properly, but Print has just got to the top of my stack and I’m a bit worried that it has fallen through the cracks which is going to cause issues as I can’t ship without it.
BTW. We do have some fallback ideas, maybe WebView HTML generation or PDF generation, but to be honest I rather liked the UWP approach to printing and really hope it makes it through to WinUI 3 Desktop.
Thanks for your time, and all your hard work. I do think this unified approach is the right way to go and I can’t wait to get away from NET Native and shipping modern apps with up-to-date backing tech (NET5/6 + WinUI)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:43 (9 by maintainers)
Top GitHub Comments
@Redp87 @NoI3ody @FreddyD-GH It looks like there is a bug in Windows 10 (internal link) that’s preventing the IPrintManagerInterop solution from working. We’re investigating servicing the fix downlevel, and will update here when we know more about that.
Sounds like this might be (finally) coming to Windows 10 in 19045.2788, which is currently in preview.
I have not tested printing there yet, but it is mentioned in the release notes and also here
– Note: I do not work for Microsoft and I am not affiliated with the WinUI / WinAppSDK in any way.