xiziwen 4 месяцев назад
Родитель
Сommit
4b35217aea
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      services/smart_report.go

+ 2 - 1
services/smart_report.go

@@ -163,6 +163,7 @@ async def main():
     await asyncio.sleep(10)
 
     await page.pdf({
+		'width': "%s",
         'path': "%s",
         'printBackground': True,
         'format': "A2",
@@ -186,7 +187,7 @@ finally:
     loop.close()
 `
 
-	pyCode = fmt.Sprintf(pyCode, utils.ChromePath, width, reportUrl, filePath)
+	pyCode = fmt.Sprintf(pyCode, utils.ChromePath, width, reportUrl, width, filePath)
 	utils.FileLog.Info("pdf pyCode: \n" + pyCode)
 	cmd := exec.Command("python3", "-c", pyCode)
 	output, e := cmd.CombinedOutput()