Explorar o código

debug: 添加pdf对应的html副本的保存

过卫栋 hai 6 días
pai
achega
2e586d204d
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      app/Services/ExamPdfExportService.php

+ 6 - 0
app/Services/ExamPdfExportService.php

@@ -1032,6 +1032,12 @@ class ExamPdfExportService
 
         // 仅使用Chrome渲染
         $chromePdf = $this->renderWithChrome($tmpHtml);
+
+        // [DEBUG] 保存 HTML 副本用于调试
+        $debugHtmlPath = storage_path('app/debug_exam_html_' . date('YmdHis') . '.html');
+        @copy($tmpHtml, $debugHtmlPath);
+        Log::warning('ExamPdfExportService: [DEBUG] HTML副本已保存', ['path' => $debugHtmlPath]);
+
         @unlink($tmpHtml);
         return $chromePdf;
     }