Print directly to default printer without print dialog

Asked by Isaac Smith on 2013-11-10

I'm building a web-based check-in kiosk using Midori on a Raspberry Pi, and will need to print directly to the system default printer from a web page. Right now, I get the standard printing dialog box when trying to print, is there a way to make Midori print without showing the dialog? Firefox and LibreOffice can both do this, so I know it's possible.

Question information

English Edit question
Midori Web Browser Edit question
No assignee Edit question
Solved by:
Isaac Smith
Last query:
Last reply:
Isaac Smith (hunternet93) said : #1

It looks like printing without showing a dialog is actually pretty simple, assuming Midori uses GTK's print API. It looks like you just pass GTK_PRINT_OPERATION_ACTION_PRINT instead of GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG to the gtk_print_operation_run() function. I might attempt to make a patch if my meager coding skills are up to the task.

Isaac Smith (hunternet93) said : #2

I eventually managed to add the option to Midori, I've uploaded branch and requested a review for merging into main.