Render MathJax into PDF #2784

Closed
opened 2026-02-05 05:11:27 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @chaieb-adel on GitHub (May 9, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Render MathJax into PDF
I have a site where math teachers write school documents together.
exemple :
I am currently using Katex for latex management (x^2).
when I export the courses to pdf.
math.pdf
I do not see a mathematical rendering but the latex source.
can you please help me.
thank you

Exact BookStack Version

BookStack v22.02-dev

Log Content

No response

PHP Version

No response

Hosting Environment

ubuntu20.04

Originally created by @chaieb-adel on GitHub (May 9, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Render MathJax into PDF I have a site where math teachers write school documents together. exemple : **<removed>** I am currently using Katex for latex management ($x^2$). when I export the courses to pdf. [math.pdf](http://www.dev4edu.com/jsPDF/examples/MathJax/math--pdf.png) I do not see a mathematical rendering but the latex source. can you please help me. thank you ### Exact BookStack Version BookStack v22.02-dev ### Log Content _No response_ ### PHP Version _No response_ ### Hosting Environment ubuntu20.04
OVERLORD added the 🐕 Support label 2026-02-05 05:11:27 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 9, 2022):

Hi @chaieb-adel,

Unfortunately we don't currently support MathJax/Katext as part of the core project, this has been added as a custom addition, so we cannot assure it's use in PDF exports so I'm going to therefore close this off. Supporting PDF rendering for dynamic/advanced features is tricky, you may have more luck producing PDFs using the browser "Print to PDF" feature.

A couple of additional notes based upon your instance:

  • You are currently using development code, not a production/release-ready version of BookStack. It's recommended you only use release code for actual use unless you are developing BookStack code yourself in a development environment.
  • Your install should not have /public within the URL, your webserver should use the BookStack public folder as the root path/location. I would not consider the current setup secure since I can access files that should not be accessibile, such as your application log file. I have deleted the URL in your original post for safety and I advise you update this as soon as possible. Might be wise to take a backup before making changes.
@ssddanbrown commented on GitHub (May 9, 2022): Hi @chaieb-adel, Unfortunately we don't currently support MathJax/Katext as part of the core project, this has been added as a custom addition, so we cannot assure it's use in PDF exports so I'm going to therefore close this off. Supporting PDF rendering for dynamic/advanced features is tricky, you may have more luck producing PDFs using the browser "Print to PDF" feature. A couple of additional notes based upon your instance: - You are currently using development code, not a production/release-ready version of BookStack. It's recommended you only use release code for actual use unless you are developing BookStack code yourself in a development environment. - Your install should not have `/public` within the URL, your webserver should use the BookStack `public` folder as the root path/location. I would not consider the current setup secure since I can access files that should not be accessibile, such as your application log file. I have deleted the URL in your original post for safety and I advise you update this as soon as possible. Might be wise to take a backup before making changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2784