HTML to PDF converter made with Golang

connectsteven

Steven Parker

Posted on June 11, 2019

HTML to PDF converter made with Golang

Follow below steps to generate HTML to PDF using Golang:

1.Create a sample HTML file inside of your project.

2.Make sure to download the below library in your system using the following command.

sudo apt install wkhtmltopdf - for Ubuntu

brew install Caskroom/cask/wkhtmltopdf - For Mac

3.Download go package using the below command for parsing the HTMl template.

go get github.com/SebastiaanKlippert/go-wkhtmltopdf

4.We need to download another package for converting this html parse data to pdf using the below command.

go get html/template

5.Run

go run main.go

After finish above steps, You can generate pdf file from html.

More check here: Golang - HTML to PDF Converter

💖 💪 🙅 🚩
connectsteven
Steven Parker

Posted on June 11, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related