Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, not directly.

I have a script which converts Markdown to HTML (using Discount; referencing my CSS file and highlight.js for syntax highlighting in code sections) and starts a headless chromium which in turn converts the rendered HTML to a PDF file.



That sounds a lot more like it. :)

Care to share your script?


https://www.filedropper.com/markdown2pdf

  $ sha256sum markdown2pdf.zip 
  97b9df1091cb29e15b699fe1b87d0de20929abfe5357d9e4db920fb24a76406b  markdown2pdf.zip
It consists of multiple files (entry point is markdown2pdf.sh) and also supports a flag '-w' to watch the markdown file so you can use an editor to modify it while your PDF viewer (in my case okular) keeps updating the changes.

I built it solely for my purpose, so it might not fit your needs (or taste). ;-)

Legal: I have no special requirements, so think of it as MIT license, but I included some other files (everything in the directory 'Markdown-Styling' except 'css/app.css' which is my CSS theme) which are available free of charge somewhere on the internet but might have their own licenses and terms of use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: