question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Printing in WinUI 3 Desktop

See original GitHub issue

Hi 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:

  1. Is the PrintManager + PrintDocument combination going to be the preferred printing technique for WinUI 3 Desktop (as per UWP)
  2. If not what is plan for WinUI 3 Desktop?
  3. Is there a vision of when the capability will be available? there’s nothing Print specific on the roadmap at the moment
  4. 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:open
  • Created 3 years ago
  • Reactions:9
  • Comments:43 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
krschaucommented, Oct 13, 2022

@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.

3reactions
Marv51commented, Mar 22, 2023

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

This update affects applications that use the Windows UI Library in the Windows App SDK (WinUI 3). It makes printing for them possible on Windows 10 devices.

– Note: I do not work for Microsoft and I am not affiliated with the WinUI / WinAppSDK in any way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WinUI3 Report Viewer - Replace Win32 print dialog with ...
This feature request is ask if you can replace the Win32 print dialog with ... is discussing the topic Question: Printing in WinUI...
Read more >
Printing a file in Windows App SDK (tested printing thought ...
I am migrating my app from UWP to WinUI 3 in Desktop with windows app sdk. I used to print using print manager...
Read more >
NET 5, WinUI 3, and WinRT APIs available to Desktop Apps
ApplicationModel.SuspendingOperation, are clearly UWP API. Others, such as Windows.Graphics.Printing.PrintTaskRequest, seem more general purpose ...
Read more >
Newest 'winui-3' Questions - Page 6
I'm looking to create state management for a Windows App desktop. It seems when going to back and forth from pages, the controls...
Read more >
WinUI 3 Controls Free - Create Modern Windows Apps
WinUI 3 Controls by DevExpress. Create modern and responsive line-of-business desktop apps that run on every Windows device.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found