Thank you for your suggestions. I tried all of these and also ghostscript. The grayscale algorithm will actually be useful for some of my other projects. In the end I used 
https://github.com/datalab-to/marker to grab the text in markdown and print that