Эх сурвалжийг харах

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

过卫栋 1 долоо хоног өмнө
parent
commit
2e586d204d

+ 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;
     }