0.0.6 • Published 5 years ago

marked-renderer-pdf-browser v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

marked-renderer-pdf-browser

A prepared build of marked-renderer-pdf for generating PDFs from markdown in browser.

This package is generated as part of CI/CD of marked-renderer-pdf.

License

MIT

Installation

npm install marked-renderer-pdf-browser

Usage

When using WebPack the converter may be imported using

import MarkdownToPDF from "marked-renderer-pdf-browser";

In addition the script may be injected using <script>-tag:

<script type="text/javascript" src="/url/to/project/node_modules/marked-renderer-pdf-browser/main.js"></script>

This will expose the converter in global variable MarkdownToPDF.

In either case you may use the converter like this:

MarkdownToPDF.convertString( yourMarkdownString )
  .then( function( pdf ) {
    // TODO: process your PDF, e.g. like this:
    domAElement.href = URL.createObjectURL( new Blob( [pdf], {
      type: "application/pdf",
    } ) );
  } );
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago