From c45028b914ad791fec00c249db1f7595926ad2a6 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 5 Jul 2023 16:44:56 +0800 Subject: [PATCH] fix --- utils/pdf/html_to_pdf.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 {