Feature-rich markdown converter currently supporting HTML and PDF
# Install markconv globaly to use in cli
npm i markconv -g
# Example cli command
markconv source=MyFile.md format=pdf
-
Export to HTML and PDF
-
CSS support
-
Automatic wiki-like heading numbering
-
LaTeX support
-
Both library and CLI tool
# Install markconv globaly
npm i markconv -g
# Use markconv in CLI
markconv --help
Install markconv
npm i markconv
Use markconv
in your code
const markconv = require('markconv')
const fs = require('fs')
markconv({
source: "MyFile.md",
style: "style.css",
output: "pdf"
},
{
pdf: {
sandbox: false,
page: {
format: 'A6',
margin: {
left: '30px',
right: '30px',
top: '30px',
bottom: '30px'
}
}
}
}).then(file => {
// Your code here, e.g.:
fs.writeFileSync(`./MyPDF.pdf`, file, "utf-8")
})
# First page
---
# Second page
<hr>
# Third page
@[toc]