Skip to content

jimandreas/markdownToPDF2

Repository files navigation

Markdown to PDF converter (kotlin)

This repo is a quick project to convert a MD (markdown) file into a decent PDF (portable document format) file for printing.

The code was entirely written by Grok 4 Fast. I iterated the discussion with Grok a couple of times to include table formatting in the markdown.

I also tried the "ultimate" test file found on SO (stackoverflow). If you run the program and look at the file.pdf output - you can see that some features / syntax are still not implemented. This is left as an exercise for any hacker who might be reading this. Pull requests are welcome. Cheers, - Jim A

Input file = file.md

Output file = file.pdf

Run this in Intellij Idea or your favorite build system. It uses Gradle KTS (Kotlin scripting) system.

Refs:

https://stackoverflow.com/questions/2238012/need-a-sufficiently-long-complex-markdown-document-for-performance-testing

https://stackoverflow.com/a/2238081/3853712

https://daringfireball.net/projects/markdown/syntax.text

webpage:

https://daringfireball.net/projects/markdown/

About

small kotlin project to convert md (Markdown) to pdf for printing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages