travs / markdown-pdf

Convert markdown to pdf, png or jpeg on the fly in Atom
MIT License
263 stars 44 forks source link

pdf file only have content in clipboard #202

Closed zewenhs closed 4 years ago

zewenhs commented 5 years ago

why the pdf file converted from md file only have content in my clipboard?

Ubuntu 14.04 Atom 1.33.1 markdown-pdf:2.2.0

But it works well in the win7 with the same version Atom and markdown-pdf.

Please help!!!

image

ryeates commented 5 years ago

Found the root cause. markdown-pdf seems to require markdown-preview to generate the HTML to convert to PDF. markdown-preview seems broken as of current version and you can see this by trying to Save As Html.. which fails to produce anything except the content of your clipboard.

Hacky workaround is to open the console and inspect element of the preview. Copy the HTML elements into a new file. Then invoke Markdown to PDF. It will moan but will produce the pdf with some minor wierdness (mostly missing CSS issues)

MCDELTAT commented 5 years ago

Just wanted to confirm I have the same bug: Ubuntu 18.04 (Linux Mint 19.1) Atom 37.0 Markdown-pdf 2.2.0

EDIT: Originally tested on 36.1, which didn't work then saw the update to 37.0

travs commented 4 years ago

This should be fixed upstream in markdown-preview now, and we also only rely on that for fallback converting at this time