Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output #9

Open
DaveyD opened this issue Feb 29, 2016 · 13 comments
Open

No output #9

DaveyD opened this issue Feb 29, 2016 · 13 comments

Comments

@DaveyD
Copy link

DaveyD commented Feb 29, 2016

Hi, I just installed Pandoc and your pandoc extension for vs-code
After installing, I opened a markdown file and tested all 3 formats
I wasnt able to get any of them to work!

Is there a setting that I am missing?

Please let me know
Thanks,
David

@BenjaminAbt
Copy link

Same here. Did you fixed it Davey?

@dfinke
Copy link
Owner

dfinke commented Mar 18, 2016

If you run pandoc against your md file at the command line, do you get errors?

pandoc test.md -o test.pdf

@BenjaminAbt
Copy link

Pandoc works fine to convert markdown to docx.
pandoc test.md -o test.docx

The extension says "Generating.." but nothing happened.

@dfinke
Copy link
Owner

dfinke commented Mar 18, 2016

Thanks for trying. Could you post the md and the version of the ext and vs code you're running.

@BenjaminAbt
Copy link

I could reproduce and fix it to the same time.

I've installed this extension yesterday and also installed pandoc afterwards (without Latex, because I do not need PDF here). After the installation I instantly tested the stuff via extension and it failed. CLI worked fine.

Now, back at home the extension works. Weird..

Well, I have now installed this extension and pandoc on my Laptop and: it does not work. CLI works here too. Then - just to have the same workflow - I've rebooted the laptop and here we go: it works.

It seems that there is at any point a restart required.

@DaveyD
Copy link
Author

DaveyD commented Mar 18, 2016

@dfinke - Good news this time! :)
I just updated my VScode and retried your exension - This time it seems to work great for HTML and DOCX.
However, for PDF it does not work.

Running from the command line returns the following error:
pandoc: pdflatex not found. pdflatex is needed for pdf output.

I am not sure what that is - is that an additional resource necessary to run?

Thanks,
David

@BenjaminAbt
Copy link

Dave, see pandoc installation note: you need LaTeX for PDF export.
image

@DaveyD
Copy link
Author

DaveyD commented Mar 18, 2016

Ok, got it - never went over pandoc docs
Thanks for that pointing that out Benjamin

@divillysausages
Copy link

Just to chime in here with some possible causes

  • Running the task in the command line, I had to install a number of additional packages (Windows). I'd originally set pandoc to ask me beforehand, so this might be blocking the case
  • I don't have Adobe Reader installed - I just use the web browser for looking at pdfs. Both the docx and html versions opened their respective editors, so it might be that

@PaulinB
Copy link

PaulinB commented Jul 26, 2016

Hi there,

I was experiencing the same issue as DaveyD: I couldn't get any PDF output using this extension, but HTML and DOCX output worked fine.

I think the issue (at least on Windows) might be permission (write) related. More information bellow.

Software configuration

I am using Windows 10 with the following software (installed in this order):

  • Sumatra PDF v3.1.1 64-bit (default PDF reader)
  • Visual Studio Code v1.3.1
  • MiKTeX (Basic) v2.9.6022 64-bit
  • Pandoc v1.17.2
  • vscode-pandoc v0.0.7

Issue

I tried to run Pandoc from the command line in the folder containing the markdown file (test.md, attached, renamed to test.txt as GitHub doesn't support MD files) with the following command: pandoc test.md -s -o test.pdf.
Test.txt

This output a proper PDF file (renamed to test_pandoc_command_line.pdf, attached).
test_pandoc_command_line.pdf

I had to install three LaTeX packages (as I use the basic version of MiKTeX, but I don't remember which ones) in order to get this file on the first time I ran Pandoc. After that, I could get a PDF file from every MD file I tested using this method without any additional install.

I tried to run the extension again, but to no avail. When pressing F1 then typing Pandoc render then choosing pdf, I had a message at the bottom of the Visual Code Studio window saying Generating [pdf] 12:27:16 (current time) and nothing happened (no PDF created in the folder).

However, I might have found the source of the issue.

Fix?

In the log of the Dev Tools Console (-1469503621744.log, attached) there are the following errors:

  • [Extension Host] pandoc: CreateDirectory ".\\tex2pdf.4244": permission denied (Acc�s refus�.)
  • [Extension Host] exec error: Error: Command failed: pandoc "d:\Paulin\Documents\Test\Test.md" -o "d:\Paulin\Documents\Test\Test.pdf" pandoc: CreateDirectory ".\\tex2pdf.4244": permission denied (Acc�s refus�.)

"(Acc�s refus�.)" should be "(Accès refusé)"; this is a French expression meaning "permission denied", as Windows is in French (but I installed Visual Studio Code in English, so this is strange...).

I think the problem comes from here, but I have no idea why. The folder is not protected in any way and I ran cmd using Shift + Right Click inside the folder
When I use pandoc in command line to generate the PDF, a folder with the same name pattern (tex2pdf.XXXX where X is a digit) is created and deleted a second later in the folder containing the test.md file.
See Pandoc_Command_line.gif (the timing of the GIF is not in real time)
pandoc_command_line

I therefore ran Visual Studio Code as Admin, opened test.md and managed to get a PDF output (renamed to test_vscode-pandoc.pdf attached) opening in Sumatra. This file is exactly the same as the one generated using Pandoc in command line.
test_vscode-pandoc.pdf

Running Visual Code Studio as admin fixes the issue of no PDF output, but running the program as admin every time might not be the best solution.

Hope this will help to solve the issue.

Thanks again for this great extension.

Best regards,

Paulin

PS: sorry for the lengthy message. This is the first time I report an issue and as I am not really into programming I am not sure how to do it in a proper way.
And sorry for the possible grammar mistakes, English is not my mother tongue.

@po5i
Copy link

po5i commented Sep 5, 2018

Yeah, I'm working on a total different project and just realized that this tex2pdf.XXXX tries to be created on the directory where pandoc was executed.

@furicle
Copy link

furicle commented Oct 23, 2018

This is related to #21

I just tested and discovered if I install the plug in as administrator, it works fine. But as a standard user, it can't find pandoc.

It must be looking at the wrong path.

Note I have a system wide VS Code install

@furicle
Copy link

furicle commented Oct 23, 2018

Hmmm - but the path is correct for both users....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants