markconv
v1.0.3
Published
Feature-rich markdown converter currently supporting HTML and PDF
Downloads
4
Maintainers
Readme
markconv
Feature-rich markdown converter currently supporting HTML and PDF
Quick start
# Install markconv globaly to use in cli
npm i markconv -g
# Example cli command
markconv source=MyFile.md format=pdf
Features
Export to HTML and PDF
CSS support
Automatic wiki-like heading numbering
LaTeX support
Both library and CLI tool
How to use
CLI
# Install markconv globaly
npm i markconv -g
# Use markconv in CLI
markconv --help
API
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")
})
Markdown helpers
Page Break
# First page
---
# Second page
<hr>
# Third page
TOC Generator
@[toc]