SebastiaanKlippert / go-wkhtmltopdf

Golang commandline wrapper for wkhtmltopdf
MIT License
1.06k stars 146 forks source link

Is there any native binding for the wkhtmltopdf library? #97

Closed abhisekp-impeller closed 2 years ago

abhisekp-impeller commented 2 years ago

This can provide interoperability and help in faster response without process creation overhead.

SebastiaanKlippert commented 2 years ago

Nope, I will not build that

Jackysi commented 2 months ago

Nope, I will not build that

May I ask why not? Is it a long process?

SebastiaanKlippert commented 2 months ago

Yes, too much hassle, C dependencies, etc. And with wkhtmltopdf no longer supported it does make sense https://wkhtmltopdf.org/status.html

In addition to that, I think most people are running this in webserver environments anyway, so I don't really see the need to bind to it from Go, in a server environment you might just as well spawn a new process that you can easily kill if something fails.

But I am not here to tell anyone not to create the bindings, just that I myself will not do it :)

Jackysi commented 2 months ago

Yes, too much hassle, C dependencies, etc. And with wkhtmltopdf no longer supported it does make sense https://wkhtmltopdf.org/status.html

In addition to that, I think most people are running this in webserver environments anyway, so I don't really see the need to bind to it from Go, in a server environment you might just as well spawn a new process that you can easily kill if something fails.

But I am not here to tell anyone not to create the bindings, just that I myself will not do it :)

Completely understand. Was just wondering what was the reason. Thanks for taking the time and for your response.

Did you maybe stumble across an alternative that would still be actively developed?

SebastiaanKlippert commented 2 months ago

There are a few, but I don't know all of them. We moved to https://go-rod.github.io Specifically https://pkg.go.dev/github.com/go-rod/rod/lib/proto#PagePrintToPDF

Jackysi commented 2 months ago

There are a few, but I don't know all of them. We moved to https://go-rod.github.io Specifically https://pkg.go.dev/github.com/go-rod/rod/lib/proto#PagePrintToPDF

That is awesome. Thanks! Looks super useful!