Convert your latex files to pdf format.
- Install
MiKTeX 2.9
on your environment nodejs
v6.9.4
- Install:
npm install node-latex-pdf
- Import in your code
- Notice: The path in latex document must using absolutive path!
const selflatex = require('node-latex-pdf');
selflatex(__dirname + '/src/document.tex', __dirname + '/dest/', (err,msg) => {
if(err)
console.log(`Error, ${msg}`);
else
console.log(`Success! ${msg}`);
});
- Kevin Cyu, [email protected]