Print to pdf parser with pdfmake

Hello all,

I’ve created a pdf parser for proseMirror that uses pdfmake. pdfmake is a very powerful javascript library that creates a pdf based on a json object.

currently, the parser converts plain and formatted text, links, horizontal lines, and headings .

It needs to be expanded for lists, tables, image processing (pdfmake needs a base64 for images).

Paragraphs work by creating a “stack” object (see pdfmake details) Text formatting works by creating a styles object (needed by pdfmake) for every “mark” in proseMirror.

also, if you take a look on how pdfmake works with columns, it shouldn’t be hard to create schema with columns (so you can have layout in proseMirror) and convert it to pdfMake.

check it out and use it as you like.

proseMirror-pdfMake enjoy

PS: A complete “marriage” between proseMirror and pdfmake has the potential to be the answer for creating a pdf from a rich-text editor. Feel free to contribute, improve and expand it.

1 Like