pdf101

simply a wrapper to generate pdf in one line.

Usage no npm install needed!

<script type="module">
  import pdf101 from 'https://cdn.skypack.dev/pdf101';
</script>

README

pdf101 :zap:

Build Status

Simply a wrapper to generate pdf in one line. Not very useful hehe.

Using with just a html

const pdf101 = require('pdf101');

const myHtml = '<h1>Hello World</h1>';
const response = await pdf101.html2pdf(myHtml);

Using with variables

Note: pdf101 rely on handlebar for templates. So you template should be just like in handlebar.

const pdf101 = require('pdf101');

const template = '<h1>Hello {{ name }}</h1>';
const response = await pdf101.html2pdf(template, { name: 'World'});