소스 검색

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

过卫栋 1 개월 전
부모
커밋
2e586d204d
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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;
     }