fix(pdf-generation): apply content filters before conversion
Ensured content filters are applied before preprocessing for MathJax to maintain consistency with WordPress content hooks. This change enhances the fidelity of the PDF content by incorporating all WordPress content transformations.
This commit is contained in:
parent
9bf5f81c84
commit
600aeba81e
1 changed files with 2 additions and 1 deletions
|
@ -820,7 +820,8 @@ function handle_pdf_download()
|
|||
$pdf->setTextColor(0);
|
||||
$pdf->Ln(10);
|
||||
$pdf->SetFont('helvetica', '', 12);
|
||||
$pdf->writeHTML(preprocess_mathjax_content($post->post_content));
|
||||
$content = apply_filters('the_content', $post->post_content);
|
||||
$pdf->writeHTML(preprocess_mathjax_content($content));
|
||||
|
||||
// Output PDF document
|
||||
$pdf->Output(sanitize_title($post->post_title) . '.pdf', 'D');
|
||||
|
|
Loading…
Reference in a new issue