Automated the google forms to pdf generation process. Using pdflatex command (external program).

Only the download automation has to be done. > look at FileSystemWatcher for automatically detecting downloads
This commit is contained in:
Douwe Ravers
2022-12-24 15:18:20 +01:00
parent bc576e433a
commit abf812c6e9
99 changed files with 2224 additions and 428 deletions

View File

@@ -0,0 +1,28 @@
using System.Diagnostics;
using System.IO;
namespace Proostenkrant.NET
{
internal static class LatexCompiler
{
internal static void Compile(string text)
{
File.WriteAllText(Program.c_articlePath, text);
GeneratePdf();
}
static void GeneratePdf()
{
var processInfo = new ProcessStartInfo("cmd.exe", "/c pdflatex " + Program.c_mainPath);
processInfo.WorkingDirectory = Program.c_latexPath;
processInfo.CreateNoWindow = true;
processInfo.UseShellExecute = true;
var process = Process.Start(processInfo);
process.WaitForExit();
}
}
}