Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PDF export #122
all, I am struggling to get @travs markdown-pdf to work. I have the latest atom (0.174.0) on a patched Windows 8.1 workstation and I have markdown-pdf (1.3.0). I have the simplest of .md files
This is a first level heading
This is a second level heading
and markdown-preview displays it correctly, but I can get nothing from C whilst the cursor is within the markdown document display. Do I need something else running on Windows for this to work or do I need to configure more elements of atom?
Please excuse my stupidity. On my windows system I had left .pdf files generated by another tool (on a cross mounted Linux system). When nothing appeared to have happened when I pressed C, I assumed an error and didn't look at the file.
My hint was when I attempted to turn a markdown file into pdf on my Fedora 21 box ... it complained that I couldn't write to the directory where the .md file lived.
Perhaps you can update the documentation for your (excellent) package by saying, something to the effect, "Position your mouse/cursor over your .md editing pane, then press C. At this point check the directory where your .md file resides and you should find a pdf of the same file name base. Note it may take some seconds".
The reason for saying and excellent package is that I have been looking for a markdown to pdf process that will scale the .png files I have in my .md file. Yours (perhaps in concert with the markdown-preview code), does the scaling.
Apologies for my failure to understand my base problem.
But a big thank you for you package
added a commit
Aug 20, 2015
Note that there are printing APIs in electron now: http://electron.atom.io/docs/v0.33.0/api/web-contents/#webcontents-print-options
Though might be tricky to just print the contents of the tab with all the correct styles (not the entire UI)
@cakebake thanks for the heads-up on your package. I have installed it and will give it a test soon. Looks to be exactly what I want. And the bonus is (or at least seems to be) I can style the HTML how I want for the PDF and have it completely different to the HTML preview in Atom, which means I don't have to worry about the weird uses-your-theme issues with markdown-preview.
The only thing I'm slightly concerned about is that it appears to generate HTML differently to how markdown-preview does, so I could well find that I make the perfect document in Atom and then come to convert it to PDF and certain bits are wrong (I'm obviously thinking about advanced stuff here like tables, HTML, GFM, etc.). Still, that remains to be seen - the fact that you developed this for developers writing documentation sounds ideal as that's what I would use it for.
@benogle The API is quite simple and effective. Unfortunately, I had problems to realize a header and footer. It is currently not available for me.
@alexrussell Yes, the package renders the Markdown autonomous and independent of the current atom theme. If you have problems with your documents and I can improve the package, feel free to open an Issue in the