vscode-markdown-preview-enhanced icon indicating copy to clipboard operation
vscode-markdown-preview-enhanced copied to clipboard

Unable to export to pdf

Open aleksnavarro opened this issue 6 years ago • 10 comments

Hi there. I'm using this plugin for Atom, I like it because it allows math expressions with LaTeX. But I have the problem of inability to export the document to pdf. When I try with Chrome (Puppeteer) it starts with a blue notification saying the document is being prepared and then a red notification appears with the legend "Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"". Then if I try with the eBook option happens the same blue notification and then a red one that says "Error: spawn ebook-convert ENOENT".

What are the problems here and how can be solved?

aleksnavarro avatar Jun 07 '19 03:06 aleksnavarro

  • install nodejs if necessary.
  • npm install puppeteer -g

tmori3y2 avatar Jun 19 '19 23:06 tmori3y2

I'm having the same problem. It worked perfectly the last time I used it (a couple of weeks ago) and now I get the same blue and red notifications. I also tried to install puppeteer, but that didn't help.

Edit: I had to uncheck the "Use puppeteer-core" checkbox in the package settings (above keybindings section).

v1r0x avatar Jun 25 '19 10:06 v1r0x

anyone solved it ?

manaclan avatar Sep 17 '19 08:09 manaclan

hello there! I've met the same problem yesterday and i have just solved it by installing Calibre

noeltong avatar Jan 31 '20 01:01 noeltong

You must probably don't have Google Chrome installed. As per the MPE docs: image

danbugs avatar Sep 09 '20 19:09 danbugs

  • install nodejs if necessary.
  • npm install puppeteer -g

This solved

joaolucaswork avatar Feb 24 '21 15:02 joaolucaswork

I have encountered a similar issue when I try to export the previewed .md file via right-click button eBook->PDF. I have installed calibre on my mac laptop and added it to my $PATH. However, it failed with an error: Error: spawn ebook-convert ENOENT Here is my .zshrc configuration: export EBOOK_PATH=/Applications/calibre.app/Contents/MacOS/ebook-convert export PATH=$PATH:$EBOOK_PATH

Ken-Leo avatar Jul 09 '22 03:07 Ken-Leo

I have encountered a similar issue when I try to export the previewed .md file via right-click button eBook->PDF. I have installed calibre on my mac laptop and added it to my $PATH. However, it failed with an error: Error: spawn ebook-convert ENOENT Here is my .zshrc configuration: export EBOOK_PATH=/Applications/calibre.app/Contents/MacOS/ebook-convert export PATH=$PATH:$EBOOK_PATH

Hi everyone, I think I have solved the above issue, i.e., export to PDF via eBook->PDF/ePub/etc. Here are my procedures:

  1. I installed two extensions, namely 'Gitbook kit' and 'Gitbook shelf'(which could be unnecessary!) though I had already installed gitbook-cli before I noticed this issue.
  2. I executed again the cmd by '$ sudo ln -s ~/Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin'.
  3. Then I relaunch VSCode and export it successfully. So weird but it does work now.

Ken-Leo avatar Jul 09 '22 03:07 Ken-Leo

I have encountered a similar issue when I try to export the previewed .md file via right-click button eBook->PDF. I have installed calibre on my mac laptop and added it to my $PATH. However, it failed with an error: Error: spawn ebook-convert ENOENT Here is my .zshrc configuration: export EBOOK_PATH=/Applications/calibre.app/Contents/MacOS/ebook-convert export PATH=$PATH:$EBOOK_PATH

Hi everyone, I think I have solved the above issue, i.e., export to PDF via eBook->PDF/ePub/etc. Here are my procedures:

  1. I installed two extensions, namely 'Gitbook kit' and 'Gitbook shelf'(which could be unnecessary!) though I had already installed gitbook-cli before I noticed this issue.
  2. I executed again the cmd by '$ sudo ln -s ~/Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin'.
  3. Then I relaunch VSCode and export it successfully. So weird but it does work now.

I was trying to export to ePub and had the same problem and this solution worked for me.

gy-toxyc avatar Oct 05 '23 16:10 gy-toxyc

The official documentation provides step-by-step instructions at: Markdown Preview Enhanced Ebook Documentation

For MacOS, only two steps are required:

  1. Install Calibre using Homebrew:
brew install calibre
  1. Create a symbolic link to the ebook-convert command:
sudo ln -s ~/Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin

nxpatterns avatar Mar 13 '24 17:03 nxpatterns