npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dmd-to-pdf

v1.0.5

Published

DMD - Document Markdown to PDF. A specialized markdown language for generating professional PDFs.

Readme

DMD - Document Markdown

A specialized markdown language for generating professional PDF documents. DMD extends markdown with powerful features for document layout, styling, and formatting.

npm version License

Installation

Requirements: pdfmake 0.3.5 or higher

npm install dmd-to-pdf [email protected]

CDN (Browser):

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/pdfmake.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dmd-to-pdf/dist/dmd.umd.js"></script>

Quick Start

Browser:

// DMD is available as global after loading the script
const document = `
:::config
title: My Document
author: John Doe
:::

# Hello World

This is a **DMD** document with *rich formatting*.

## Features

- Simple markdown syntax
- Professional PDF output
- Tables, lists, and more
`;

// Generate PDF
const pdfBlob = await DMD.createPdf(document);

Node.js:

// Setup pdfmake
const pdfmake = require('pdfmake');
const vfsFonts = require('pdfmake/build/vfs_fonts');
pdfmake.vfs = vfsFonts.pdfMake.vfs;

// Import DMD
const DMD = require('dmd-to-pdf');

const pdfBuffer = await DMD.createPdf('# Hello World');

Free vs Pro Features

| Feature | Free | Pro | |---------|:----:|:---:| | Basic markdown (headings, text, lists) | ✓ | ✓ | | Document config (title, margins, page size) | ✓ | ✓ | | Basic tables | ✓ | ✓ | | Multi-column layouts | ✓ | ✓ | | Images & SVG | ✓ | ✓ | | Links | ✓ | ✓ | | Headers & footers | ✓ | ✓ | | Inline styling [text]{::style} | ✓ | ✓ | | Custom fonts (non-Roboto) | - | ✓ | | Watermarks | - | ✓ | | Background layers | - | ✓ | | Table of contents & bookmarks | - | ✓ | | QR codes | - | ✓ | | Block styling ::style-name | - | ✓ | | Table/list/column styling | - | ✓ |

Enabling Pro Features

// Set your license key to enable Pro features
const result = await DMD.setLicense('DMD-XXXX-XXXX-XXXX-XXXX');

if (result.valid) {
  console.log('Pro features enabled!');
}

Get a license at dmdlang.dev/pricing

API Reference

DMD.createPdf(source, format?)

Generate a PDF from DMD source.

  • source - DMD formatted string
  • format - Output format: 'blob' (default), 'base64', 'dataUrl', 'buffer' (Node.js)

DMD.extractConfig(source)

Extract metadata and config without generating PDF.

DMD.loadImages(imageMap)

Preload images for better performance.

await DMD.loadImages({
  logo: 'https://example.com/logo.png',
  banner: '/images/banner.jpg'
});

DMD.loadFonts(fontMap)

Load custom fonts. (Pro)

await DMD.loadFonts({
  'MyFont': {
    normal: 'https://example.com/font.ttf',
    bold: 'https://example.com/font-bold.ttf'
  }
});

DMD.setLicense(key)

Set and validate a license key.

DMD.isPro()

Check if Pro features are enabled.

See full API documentation at DMD_API.md

DMD Syntax

:::config
title: Document Title
author: Author Name
pageSize: A4
pageMargins: [40, 60, 40, 60]
:::

:::styles
title:
  fontSize: 24
  bold: true
  color: "#333333"
:::

# [Document Title]{::title}

Regular paragraph with **bold** and *italic* text.

## Lists

- Item one
- Item two
  - Nested item

## Tables

::table
Name | Age | City
Alice | 30 | New York
Bob | 25 | London
::

## Links

[Visit our website]{url: https://dmdlang.dev}

## Images

[Company Logo]{img: logo}

Documentation

License

This software is proprietary. See LICENSE for details.

  • Free Features: Available for personal and commercial use
  • Pro Features: Require a valid license key

Copyright (c) 2026-present JSA DESENVOLVIMENTO DE SOFTWARES LTDA. All rights reserved.