fix
This commit is contained in:
parent
f7ed913470
commit
c45028b914
|
@ -6,7 +6,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// html转 Pdf dataType = 1 为网页url dataType = 2为网页内容 outFile为空则不保存(使用该方法需要安装工具 sudo apt-get install wkhtmltopdf)
|
/*
|
||||||
|
html转 Pdf
|
||||||
|
dataType = 1 为网页url dataType = 2为网页内容
|
||||||
|
outFile为空则不保存(使用该方法需要安装工具 sudo apt-get install wkhtmltopdf)
|
||||||
|
*/
|
||||||
func HtmlToPdfBase64(content string, dataType int, outFile ...string) (string, error) {
|
func HtmlToPdfBase64(content string, dataType int, outFile ...string) (string, error) {
|
||||||
pdfg, err := wkhtmltopdf.NewPDFGenerator()
|
pdfg, err := wkhtmltopdf.NewPDFGenerator()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user