markconv

1.0.3 • Public • Published

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

API example

Features

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]

Package Sidebar

Install

npm i markconv

Weekly Downloads

7

Version

1.0.3

License

ISC

Unpacked Size

35.9 kB

Total Files

10

Last publish

Collaborators

  • devicarus