MiKTeX and proTeXt ⇒ TexStudio error: Failed to find .pdf file for previewing
TexStudio error: Failed to find .pdf file for previewing
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!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: TexStudio error: Failed to find .pdf file for previewing
If it is there, you have trouble with the internal viewer, if not you have trouble with the compilation.
Re: TexStudio error: Failed to find .pdf file for previewing
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.
Thanks in advance!! =)
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
TexStudio error: Failed to find .pdf file for previewing
Code: Select all
\documentclass{article}\begin{document}Hello\end{document}
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.
Re: TexStudio error: Failed to find .pdf file for previewing
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: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: TexStudio error: Failed to find .pdf file for previewing
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).
Re: TexStudio error: Failed to find .pdf file for previewing
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: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
TexStudio error: Failed to find .pdf file for previewing
Re: TexStudio error: Failed to find .pdf file for previewing
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!!!!!!


-
- Posts: 1
- Joined: Sun May 28, 2023 1:23 pm
TexStudio error: Failed to find .pdf file for previewing
Johannes wrote: 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).
That gave a link to: https://tex.stackexchange.com/questions ... 8132#98132
"With OSX: texStudio > Preferences, select Build, option Default Compiler. " I can't find the equivalent for my installation of TexStudio on Ubuntu. Am I missing something obvious?
Thanks.
Ian Fantom