c# - 如何防止 LaTex 代码编译后弹出 pdf 文件?
问题描述
我正在使用 C# 制作一个 WinForm 应用程序,我将在其中编译一些 LaTex 代码并获取生成的 PDF 文件,然后将 PDF 文件转换为图像。但是每次我点击按钮,PDF文件都会弹出来,这很烦人!以下是我与该按钮相关的代码。
private void Button1_Click(object sender, EventArgs e)
{
p1 = new Process();
p1.StartInfo.FileName = "F:\\texlive\\2018\\bin\\win32\\pdflatex";
p1.StartInfo.Arguments = "input.tex";// input.tex is the latex file I prepared
p1.StartInfo.UseShellExecute = false;
p1.StartInfo.CreateNoWindow = true;
p1.StartInfo.RedirectStandardOutput = true;
p1.StartInfo.RedirectStandardError = true;
p1.StartInfo.RedirectStandardInput = true;
p1.Start();
// richTextBox2.Text = p1.StandardOutput.ReadToEnd();
pdfWrapper.LoadPDF("output.pdf"); // use PdfLiNnet to convert the output pdf file to jpg
pdfWrapper.ExportJpg("output.jpg",1,1, Dpi, Qua);
p1.WaitForExit();
p1.Close();
}
有谁知道在编译 LaTex 代码后如何防止或隐藏 pdf 文件的弹出窗口?提前致谢。
解决方案
推荐阅读
- spring - Spring Boot Autowired 是否比手动创建对象更好?
- sql - 在非常大的表数据中优化 Oracle 组的查询
- list - 调试二叉树生成器 LISP
- javascript - 在 iis 服务器 ASP.net C# 上部署时,将文本从文本框复制到剪贴板不起作用
- android-studio - Kotlin 游乐场的结果窗格就像 Xcode 游乐场一样?
- docker - Kubernetes 弹性一体机在 arm64 机器上失败?
- ffmpeg - ffmpeg 如何混合 2 个单独随机启动和停止的 RTP 流?
- java - 通过 Servlet 读取和存储图像的有效方法(避免 DoS)
- python - 如何修改 Python 中预先存在的类以添加自定义方法?
- kibana - Kibana 时间未以正确格式显示