bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.6k stars 2.03k forks source link

Support for Markdown #1651

Open jwerre opened 5 years ago

jwerre commented 5 years ago

I wonder if it would be worth creating a plugin for markdown. Something like:

{
    markdown: '[PDFMake](https://github.com/bpampuch/pdfmake) *NOW* supports **Markdown**'
}

Under the hood it would produce a standard text stack:

{
    text: [
        {text: 'PDFMake', link: 'https://github.com/bpampuch/pdfmake'},
        {text: 'NOW', italics: true},
        'supports ',
        {text: 'Markdown', bold: true},
    ]
}

Thoughts?

jwerre commented 5 years ago

Just a status update on this. I'm going to go ahead with this since I need it for my own use. When I'm done I'll set up a pull request and you can merge it if you feel like it would be useful to others. It should be fairly lightweight.

jwerre commented 5 years ago

I ended up creating a plugin for a Remarkable markdown parser. You can check it out here: https://github.com/jwerre/remarkable_pdfmake

zxlin commented 4 years ago

@jwerre Thanks for creating that! Will be giving it a try!

I was also looking for markdown to pdfmake plugins. Curious if you had saw this along the way: https://github.com/zeitdev/markdown-to-pdfmake

jwerre commented 4 years ago

Curious if you had saw this along the way: https://github.com/zeitdev/markdown-to-pdfmake

No I hadn't.

bgl3317 commented 2 years ago

This would be amazing. Does anyone know of an existing solution that handles a more comprehensive set of markdown features such as lists and tables?