fix(pdf): preprocess MathJax in post content before PDF generation
Integrates MathJax content preprocessing into the PDF generation function to ensure that mathematical expressions are accurately rendered in the generated PDFs. This resolves issues where mathematical notations in posts were not displayed correctly in the PDFs.
This commit is contained in:
parent
02796a28d8
commit
9bf5f81c84
1 changed files with 1 additions and 1 deletions
|
@ -820,7 +820,7 @@ function handle_pdf_download()
|
|||
$pdf->setTextColor(0);
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
$pdf->writeHTML($post->post_content);
|
||||
$pdf->writeHTML(preprocess_mathjax_content($post->post_content));
|
||||
|
||||
// Output PDF document
|
||||
$pdf->Output(sanitize_title($post->post_title) . '.pdf', 'D');
|
||||
|
|
Loading…
Reference in a new issue