|
@@ -94,12 +94,12 @@ func generateAndUploadJPEG(params PDFParams, reportUrl, pdfPath string, ossClien
|
|
|
if reportUrl == "" {
|
|
|
return
|
|
|
}
|
|
|
- err = ReportToPdf(params.Width, reportUrl, pdfPath, params.Top, params.Bottom, params.Left, params.Right)
|
|
|
+ err = ReportToJpeg(params.Width, reportUrl, pdfPath)
|
|
|
if err != nil {
|
|
|
utils.FileLog.Info("ReportToJpeg failed: , error: \n" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
- resourceUrl, err = uploadFile(ossClient, pdfPath, "pdf")
|
|
|
+ resourceUrl, err = uploadFile(ossClient, pdfPath, "jpg")
|
|
|
if err != nil {
|
|
|
utils.FileLog.Info("文件上传失败, Err: \n" + err.Error())
|
|
|
return
|
|
@@ -152,7 +152,7 @@ func Report2pdfAndJpeg(reportUrl string, reportId int, ReportLayout string) (pdf
|
|
|
err = fmt.Errorf("生成PDF失败,error: \n" + pdfResult.err.Error() + jpegResult.err.Error())
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ pdfUrl, jpegUrl = pdfResult.url, jpegResult.url
|
|
|
return
|
|
|
}
|
|
|
|