fix(pdf-download): remove preprocess_mathjax_content call

Removed the preprocess_mathjax_content function call before writing HTML content to the PDF. This resolves issues with content formatting and ensures that the PDF output matches the original post content more closely.
This commit is contained in:
Kumi 2024-08-03 15:37:52 +02:00
parent 600aeba81e
commit 8574de341a
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -821,7 +821,7 @@ function handle_pdf_download()
$pdf->Ln(10);
$pdf->SetFont('helvetica', '', 12);
$content = apply_filters('the_content', $post->post_content);
$pdf->writeHTML(preprocess_mathjax_content($content));
$pdf->writeHTML($content);
// Output PDF document
$pdf->Output(sanitize_title($post->post_title) . '.pdf', 'D');