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