Browse Source

fix: 继续调试pdf

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

+ 8 - 0
app/Services/ExamPdfExportService.php

@@ -1247,8 +1247,16 @@ class ExamPdfExportService
      */
     private function inlineExternalResources(string $html): string
     {
+        // 【调试】记录HTML内容信息
+        Log::warning('ExamPdfExportService: inlineExternalResources', [
+            'html_length' => strlen($html),
+            'has_katex_cdn' => strpos($html, 'cdn.jsdelivr.net/npm/katex') !== false,
+            'html_head_preview' => substr($html, 0, 1000),
+        ]);
+
         // 检查是否包含KaTeX CDN链接
         if (strpos($html, 'cdn.jsdelivr.net/npm/katex') === false) {
+            Log::warning('ExamPdfExportService: HTML中没有KaTeX CDN链接,跳过内联');
             return $html;
         }