Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process process = new Process();
- DirectoryInfo dir = new DirectoryInfo(katalogZplikamiODT);
- FileInfo[] info = dir.GetFiles("*.odt");
- foreach (FileInfo f in info)
- {
- string arg = String.Format(" --headless --convert-to pdf --outdir " + katalogZplikamiODT + " " + f.FullName);
- ProcessStartInfo startInfo = new ProcessStartInfo();
- startInfo.WindowStyle = ProcessWindowStyle.Normal;
- startInfo.FileName = @"C:\Program Files (x86)\LibreOffice 5\program\soffice.exe";
- startInfo.Arguments = arg;
- startInfo.UseShellExecute = true;
- process.StartInfo = startInfo;
- process.Start();
- process.WaitForExit(3000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement