Golang-HTML-TO-PDF-Converter

Golang HTML to PDF Converter

Github星跟蹤圖

Golang HTML to PDF Converter




License: MIT

For reading any document, one prefers PDF format over any other formats as it is considered as a standard format for any document in our day to day life. We often come across converting any form details or previews on the website in the form of HTML to PDF. For GoLang, understanding such usability, Developers at Mindinventory made an effort for making one HTML to PDF Converter which can be used for converting HTML content to PDF.

What it is?

It is a repository, integrating which one can offer HTML to PDF Conversion to their customers.

Prerequisite

Install wkhtmltopdf using below command

  • sudo apt install wkhtmltopdf - for Ubuntu
  • brew install Caskroom/cask/wkhtmltopdf - For Mac

Steps to Follow

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

  2. Get go package using the below command for parsing the HTMl template.

    • go get github.com/SebastiaanKlippert/go-wkhtmltopdf
  3. Get another go package for converting this html parse data to pdf using the below command.

    • go get html/template
  4. Run below command

    • go run main.go

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

NOTES: Don't forget to mention your html and pdf path details inside your code. If you want to generate pdf for static data then it is not mandatory to generate another html for clone data. Use that same sample html inside the code.

LICENSE!

Golang HTML to PDF Converter is MIT-licensed

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.

主要指標

概覽
名稱與所有者Mindinventory/Golang-HTML-TO-PDF-Converter
主編程語言Go
編程語言Go (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2019-04-22 10:44:59
推送於2023-10-09 18:05:17
最后一次提交2023-04-25 16:32:23
發布數0
用户参与
星數379
關注者數8
派生數90
提交數13
已啟用問題?
問題數8
打開的問題數3
拉請求數2
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?