Comments (23)
For Mac
brew install phantomjs
For Ubuntu
apt install phantomjs
then restart vscode, problem solved
from vscode-markdown-pdf.
For macOS 10.12 (brew was installed):
brew install phantomjs
cd ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt
mkdir lib/phantom/bin
ln -s /usr/local/bin/phantomjs lib/phantom/bin/phantomjs
from vscode-markdown-pdf.
With the Internet connected, please open the markdown file with vscode.
Then phantomjs binary will be installed.
from vscode-markdown-pdf.
I got a same error after install when I used "Convert Markdown to PDF".
Error message is
ERROR: phantomjs binary does not exist: /Users/username/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe
The last two path separator are '\', not '/'.
I can found this exe file under the right path, but the default permissions of ~/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs.exe
is -rw-r--r--, maybe it should be -rwxr-xr-x?
OS: OS X EI Caption
Markdown PDF: 0.1.7
from vscode-markdown-pdf.
I met the same issue as @marsdotpset ,
OS: ubuntu16.04
Markdown PDF:0.1.7
from vscode-markdown-pdf.
Simplest workaround for OSX users, at least, is to install Node.js (https://nodejs.org/en/), then go into the extensions directory and rebuild phantomjs:
cd $HOME/.vscode/extensions/yzane.markdown-pdf-0.1.7/node_modules/phantomjs-prebuilt
/usr/local/bin/node install.js
from vscode-markdown-pdf.
Having the same problem, got it working by symlinking the phantomjs binary:
mkdir -p ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin
ln -s ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/
from vscode-markdown-pdf.
I found same issue in my environment.
I got following error:
ERROR: phantomjs binary does not exist: /Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
but phantomjs pre-built binary is installed in:
/Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs
Please check again.
from vscode-markdown-pdf.
Thank you for your report.
The following file is not a binary file.
/Users/USERNAME/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs
Is there the following phantomjs binary file?
- Windows
C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.4\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
- Linux
~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
from vscode-markdown-pdf.
If phantomjs is found in lib or on PATH, it will not be re-copied to dir ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/lib/phantom/bin
. So I think you should just use ~/.vscode/extensions/yzane.markdown-pdf-0.1.4/node_modules/phantomjs-prebuilt/bin/phantomjs
instead here, it will always work well.
from vscode-markdown-pdf.
With the Internet connected, please open the markdown file with vscode.
Then phantomjs binary will be installed.
--
This solution doesn't work for me.
from vscode-markdown-pdf.
I also had the same problem. Downloading the latest phantomjs and pasting the exe under C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.4\node_modules\phantomjs-prebuilt\lib\phantom\bin\
workaround solved it.
from vscode-markdown-pdf.
Thanks for report.
@applee I will check it.
from vscode-markdown-pdf.
Released 0.1.5 with this fix.
Please update!
from vscode-markdown-pdf.
Still getting the same error after uninstall/install:
ERROR: phantomjs binary does not exist: C:\Users[usernamehere].vscode\extensions\yzane.markdown-pdf-0.1.5\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
from vscode-markdown-pdf.
@eminsenay Thanks for info.
Markdown-pdf will automatically download phantomjs.
In version 0.1.4, if phantomjs were found in PATH, an error occurred.
This problem was fixed in version 0.1.5.
However, it seems that an error has occurred due to other causes.
With this fix, if phantomjs is found in PATH it will be used.
Therefore, if an error occurs, please download and install phantomjs from here and set it to PATH.
from vscode-markdown-pdf.
I got a same error after install when I used "Convert Markdown to PDF". but when I install Node.js and reload this ext. This error is fixed.
So, I think here maybe has some problem.
Another method to resolve this error(just windows):
- Download phantomjs from here
- Extract (unzip) the content and copy the
bin
folder to
C:\Users[usernamehere].vscode\extensions\yzane.markdown-pdf-0.1.5\node_modules\phantomjs-prebuilt\lib\phantom
- Restart vscode.
from vscode-markdown-pdf.
Same problem for me as well
ERROR: phantomjs binary does not exist: C:\Users\USERNAME\.vscode\extensions\yzane.markdown-pdf-0.1.6\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
What's weird is the file does exist at that location though. After doing the steps above of manually downloading and overwriting that file, then it works as expected.
from vscode-markdown-pdf.
Same problem for me as well. @Amroll solution works for me. Like @deadlydog the file already existed at the appropriate location.
from vscode-markdown-pdf.
Since the size limit of the extensions increased from 20 MB to 100 MB, we included phantomjs.exe for Windows in Markdown-PDF 0.1.7.
Increase Extension Size Limit
from vscode-markdown-pdf.
Same issue on MacOSX. The pre-build phantomjs.exe executable is a Windows binary. Not usable by OSX or Linux.
from vscode-markdown-pdf.
@malk271's rebuilding phantomjs suggestion worked for me on high sierra.
from vscode-markdown-pdf.
Markdown PDF ver1.0.0 replaced PDF converter with puppeteer instead of node-html-pdf.
Therefore PhantomJS is no longer used.
from vscode-markdown-pdf.
Related Issues (20)
- Glyph from a TTF not rendered in PDF
- Page numbers not showing up HOT 1
- High Fan Speed when attempt export to HTML or PDF - Unable to export from Markdown
- CSS float seems to be ignored HOT 1
- Layout Issues with div Tags in Markdown when Outputting to PDF
- Kate auto renderer for HTML exports needs update
- What am I missing? It doesn't convert math formula embedded at all. HOT 3
- Empty Page Number
- PDF output does not utilize CSS stylization.
- Enable GitHub Discussion.
- What is the installed location of Chromium, and how can it be deleted? HOT 1
- how to add a underline under the img of the page header HOT 1
- text-underline-offset is not valid
- PDF text selection and search is not working HOT 2
- Add support for markdown note format HOT 1
- Add support for Mermaid invisible links
- The new keywords from metadata to be added to the header/footer template.
- [demand]希望增加直接将一个文件夹中所有markdown文件导出为一个pdf的功能 HOT 1
- Blockquote render PDF
- References that skip invalid characters are not created as links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-markdown-pdf.