Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to print ? #412

Open
FiveTechSoft opened this issue Jul 7, 2020 · 6 comments
Open

Is it possible to print ? #412

FiveTechSoft opened this issue Jul 7, 2020 · 6 comments

Comments

@FiveTechSoft
Copy link

What OS are you using (uname -a, or Windows version)?

What programming language are you using (C/C++/Go/Rust)?

What did you expect to see and what you saw instead?

@abemedia
Copy link
Member

Yes it is. Use the window.print() JavaScript function.

@paulovitin
Copy link

@abemedia I try calling window.print() in macOS and nothing happens. 😞

@abemedia
Copy link
Member

abemedia commented Aug 7, 2020

Looks like the print functionality is in a private API (like clipboard): https://github.com/WebKit/webkit/blob/master/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h#L106

Unfortunately this means it can't be used in apps that are submitted to the Mac App Store 😢

@paulovitin
Copy link

@abemedia is there any solution to work around this in apps that will not be sent to the Apple store?

@abemedia
Copy link
Member

There's actually an open issue regarding another private API - the clipboard: #425

Might just add this and implement the flag as mentioned in the ticket above to disable private APIs for app store apps.

@gedw99
Copy link

gedw99 commented Nov 1, 2021

Just checking if anyone got printing on Mac working or if there is anything blocking this being fixed ?

I need to get printing working with gioui and a webview is a good way to do it as gio mobile and desktop can render to web also.

thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants