michael-brade / LaTeX.js

JavaScript LaTeX to HTML5 translator
https://latex.js.org
MIT License
736 stars 58 forks source link

Convert Latext to PDF #141

Closed arhariri79 closed 1 year ago

arhariri79 commented 1 year ago

Hello Thank you for latex.js I want to convert latex js to pdf without any third party library . Please help me.

Thanks a lot my dear.

michael-brade commented 1 year ago

Hi, thank you. But for PDF output, LaTeX is actually the right tool. LaTeX.js is meant to output HTML, it will never support PDF.

cheers, Michael

arhariri79 commented 1 year ago

Hi thank your for your response , but i have admin panel that user upload latex file and then i convert to html with latex.js in client and i want convert pdf like the html . that mean i want convert latex file to pdf in client . thanks my dear .

michael-brade commented 1 year ago

I see. Then you have to use your browser's ability to turn a webpage (html) to PDF by exporting the page as PDF or printing it. But that is a very inferior way of doing it. The browser's quality is nowhere near the original LaTeX output quality... you could maybe use a webservice that creates the PDF on the server with a standard TeXLive installation and then send the PDF back to the client. I would think that there already are such services or implementations.