大侠咬超人 4 дней назад
Родитель
Сommit
6861a485fb
1 измененных файлов с 8 добавлено и 0 удалено
  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;
         }