SebastiaanKlippert / go-wkhtmltopdf

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

Write to buffer #29

Closed Arteneko closed 5 years ago

Arteneko commented 5 years ago

I didn't find any direct way, so here's my question: Is there any good way to directly write to a Writer buffer?

The context is to generate a PDF and directly send it through the http.ResponseWriter.

SebastiaanKlippert commented 5 years ago

Hello,

This was not possible, but it sound like a nice feature.

If have added a SetOutput method that will accept an io.Writer so you can write directly to a file or http.ResponseWriter.

Let me know if that helps then I will create a new release.

Arteneko commented 5 years ago

Definitely looks useful

SebastiaanKlippert commented 5 years ago

Released in v1.3.0