sqweek / dialog

Simple cross-platform dialog API for go-lang
ISC License
493 stars 76 forks source link

Print dialog #23

Closed ghost closed 4 years ago

ghost commented 5 years ago

I need to open a printer dialog so I can print a pdf from golang.

sqweek commented 5 years ago

You realise that the dialog doesn't print anything for you right? It just allows the user to select print options - you still have to take care of printing the pdf yourself.

Talking about these options in a cross-platform way seems non-trivial and it's likely not something I'll find time to research by myself. If you can point me at an existing cross-platform printing module for go I might be able to get somewhere.

ghost commented 5 years ago

hey @sqweek Yep i do realise its just a dialog.

There is a fair bit of code out their to pull this off these days.

two ways to do this with golang

  1. Make a direct call to Windows system to open a dialog.

  2. Make a call via the Google CLoud Print connector. This is the call... https://github.com/google/cloud-print-connector/blob/master/winspool/winspool.go#L617

I would be happy to work with you to get this going...