Hi Rory, I've just done this! I've been working on a series of guided essay writing applications where the output is both Word and PDF. I ended up going through ports and generating the PDF using pdfMake:
https://github.com/bpampuch/pdfmake And this parser: http://jsfiddle.net/mychn9bo/75/ pdfMake is incredibly configurable - I believe it allows you to set specific line breaks.... ? These were the steps I followed to get my content out of Elm an turn it into a printable, downloadable PDF doc: 1. I sent my content from Elm though a port as a string of markdown text. 2. I formatted it as HTML on the JS side using marked.js (that's because pdfMake needs the text to be in HTML format) 3. I ran the newly HTML-ized content though a slightly modified version of the parser linked above. 4. And finally sent the parsed content to pdfMake's `createPdf` method. It's a little bit of work - but not too bad and definitely worth it! Cheers, Rex PS: Word output requires something else... just let me know if you ever need to do that. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
