diff --git a/utils/pdf/html_to_pdf.go b/utils/pdf/html_to_pdf.go index f2a8b15e..c81f9e10 100644 --- a/utils/pdf/html_to_pdf.go +++ b/utils/pdf/html_to_pdf.go @@ -6,7 +6,11 @@ import ( "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) { pdfg, err := wkhtmltopdf.NewPDFGenerator() if err != nil {