去-htmltopdf
转到 wkhtmltopdf 的绑定 - 使用 Webkit 将 HTML 转换为 PDF
用法
package main
import "github.com/pleximus/go-htmltopdf"
converter := html2pdf . New ()
// Converting HTML data and returning data buffer
// which can be used to write data to a file or
// pipe it directly as http response
converter . SetData ( "<h2>Trying html to pdf</h2>" )
err , data := converter . CreatePDF ()
if err != nil {
t .
评论0
最新资源