Browse Source

fix: chrome生成pdf问题

大侠咬超人 4 days ago
parent
commit
b7df3013e4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/Services/ExamPdfExportService.php

+ 2 - 0
app/Services/ExamPdfExportService.php

@@ -1073,6 +1073,8 @@ class ExamPdfExportService
             '--disable-background-mode',
             '--disable-extensions-http-throttling',
             '--disable-ipc-flooding-protection',
+            '--single-process',           // 单进程模式,避免 dbus 问题
+            '--disable-features=Dbus',    // 禁用 dbus
             '--user-data-dir=' . $userDataDir,
             '--print-to-pdf=' . $tmpPdf,
             '--print-to-pdf-no-header',