I am trying to make a Print application on UWP, but the samples show
await Windows.Graphics.Printing.PrintManager.ShowPrintUIAsync();
This brings the UWP Print Dialog.
I need to print directly without this dialog.
I need something like
await Windows.Graphics.Printing.PrintManager.PrintAsync();
Also see issue https://github.com/microsoft/microsoft-ui-xaml/issues/2126 which should probably be merged into this issue here.
The linked thread notes that silent printing works when a WinUI app is built with Win32 appmodel, but not with UWP app model. There's also some discussion there around scenarios where the user shouldn't be surprised by an unexpected (and silent) print.
Is it reasonable to say that silent printing should go through a broker with user consent policy when the app is running as AppContainer (independent of UWP/Win32 app model?)
Seems pretty OK if we do a one-time prompt like we do with other resources. The user can deny access from Settings if necessary, or the administrator can override and never require prompting.
@AwsomeCode Do you need other features as well? In the past when we've looked at this, it's not just the ability to print silently, but developers often need fine-grained control over the settings a user could set in the dialog (or any advanced dialogs) like which printer, which paper tray, which options, etc. Does the current PrintTaskOptions class have enough control for you?
@ptorr-msft
developers often need fine-grained control over the settings a user could set in the dialog (or any advanced dialogs) like which printer, which paper tray, which options, etc.
Yes we need to provide some Dialog page where user can select printer and page size. And we also need to support all kind Thermal/Raw printer for POS application.
Does the current PrintTaskOptions class have enough control for you
I am not sure about this.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 10 days. It will be closed if no further activity occurs within 10 days of this comment.
@stevewri @ptorr-msft My primary requirement for the API is to support Thermal Printers for POS Application.
Where we don't required any prompt for printing every invoices.
We should set the printer setting at some place for one time.
And then afterwords every print command silently fetches those print setting and print the invoice.
Let's continue the party on #124
Most helpful comment
Seems pretty OK if we do a one-time prompt like we do with other resources. The user can deny access from Settings if necessary, or the administrator can override and never require prompting.