I have my TeX file (only firstExample.tex inside my folder) document and I want to convert it to PDF and display it within the application.
\documentclass[11pt]{article}
\begin{document}
this is only a test
$$(x+1)$$
\end{document}
i do this:
string filename = @"C:\inetpub\wwwroot\MyApp\Application\Temp\firstExample.tex";
Process p1 = new Process();
p1.StartInfo.FileName = @"C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe";
p1.StartInfo.Arguments = filename;
p1.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
p1.StartInfo.RedirectStandardOutput = true;
p1.StartInfo.UseShellExecute = false;
p1.Start();
var output = p1.StandardOutput.ReadToEnd();
p1.WaitForExit();
but output returns :
"This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)
entering extended mode !
I can't write on file `firstExample.log'
Please type another transcript file name: "
instead of the expected PDF
$$ .. $$, see e.g. Why is\[ … \]preferable to$$?) – Torbjørn T. Dec 03 '13 at 14:47.texextension when running (pdf)latex. – Chris H Dec 03 '13 at 14:54\documentclass[11pt]{article} \usepackage{graphicx} \begin{document} this is only a test \end{document}I think its not working properly on pdflatex.exe? Is it possible to show me a working example that returns PDF from pdflatex.exe? – user42110 Dec 03 '13 at 15:15pdflatex. What happens when you try? – Torbjørn T. Dec 03 '13 at 15:52