## LaTeX forum ⇒ MiKTeX and proTeXt ⇒ TexStudio error: Failed to find .pdf file for previewing

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
bubblegum
Posts: 6
Joined: Sat Feb 01, 2014 8:11 pm

### TexStudio error: Failed to find .pdf file for previewing

Hi,

I have just downloaded MikTex and TexStudio via Protex. I think my file gets compiled fine, because I don't get any error messages, but when I try to preview the compiled file I get the following error message. "Failed to find file "C:\user\xxxxxx.pdf".

I have tried using the both the compile and preview buttons on TexStudio and also F6 and F7.

Help!!
Thanks!

Tags:

Johannes_B
Site Moderator
Posts: 4160
Joined: Thu Nov 01, 2012 4:08 pm
Can you check if the file is created by opening the folder with the explorer and searching for the pdf?

If it is there, you have trouble with the internal viewer, if not you have trouble with the compilation.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bubblegum
Posts: 6
Joined: Sat Feb 01, 2014 8:11 pm
Hi Johannes_B,

I'm soo sorry but I'm very new to downloading latex. I have never downloaded it onto my own computer before. Could you plz give me some instructions on how to check that? and also if that's the case how to fix it.

but when I try to press the external pdf viewer button, I get this error message: Error: Could not start the command: "C:/Program Files/MiKTeX 2.9/pdftex/config/pdftex.cfg" "texstudio_qH1728".pdf

I think my compilation (when I press the green play button) works normally though, since I get no error message.

Johannes_B
Site Moderator
Posts: 4160
Joined: Thu Nov 01, 2012 4:08 pm
Create a minimal example, say:

\documentclass{article}\begin{document}Hello\end{document}

and save it into a folder you well know and are able to find on your system.
Compile this document using F6. If no error is shown (there should be no error) open the windows explorer (or something similar), change into the folder you just saved the document and look for the pdf. The pdf will have the same basename, i.e. hello.tex is output to hello.pdf.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bubblegum
Posts: 6
Joined: Sat Feb 01, 2014 8:11 pm
Hi Johannes_B,

Still not having any luck. I have made the file as you mentioned and saved it as a .txt file onto my desktop. Then after compiling it (which I think was done successfully since I got no errors) I only have the following hello.x files in my desktop: AUX, DVI, Text document and TEX files. No .pdf file at all.

Thanks! Really appreciate you help!! =)

Johannes_B
Site Moderator
Posts: 4160
Joined: Thu Nov 01, 2012 4:08 pm
Hi, i hope it was a typo, but the file ending should be tex.

Make sure to compile with pdflatex (you can choose that under tools).

latex compiles a dvi, which you can transfer to ps (post script) and further to pdf OR you can directly compile to pdf with pdflatex (in pdf mode).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bubblegum
Posts: 6
Joined: Sat Feb 01, 2014 8:11 pm
Hi,

I realised that my compiler was set to Latex an not pdfLaTex. I switched it to pdfLatex and still nothing.... =(

I get this error message:
Error: Could not start the command: "C:/Program Files/MiKTeX 2.9/pdftex/config/pdftex.cfg.template" -synctex=1 -interaction=nonstopmode "texstudio_qc7956".tex

Is it some thing wrong with my download. I really don't see where I'm going wrong.

Really need to get this working... =( Thanks!!!!

Johannes_B
Site Moderator
Posts: 4160
Joined: Thu Nov 01, 2012 4:08 pm
Please check the settings as seen here. Your command call is set wrong, it should be just pdflatex (or pdflatex.exe, i'm not sure).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bubblegum
Posts: 6
Joined: Sat Feb 01, 2014 8:11 pm
Hi Johannes_B,

YESS!! It's working!! I changed all the given ones to match your screenshot and also set all the commands to default and it started to work! The weird thing is though that I never changed any thing in the beggining at all so I have no idea how they changed from default.

Any wayz, THANK YOU!!!!!!