Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Run QPDF to decrypt the input file
- private bool decrypt()
- {
- // Create new process
- Process decryptProcess = new();
- decryptProcess.StartInfo.UseShellExecute = false;
- decryptProcess.StartInfo.CreateNoWindow = true;
- // Parameters
- decryptProcess.StartInfo.FileName = "QPDF\\qpdf.exe";
- decryptProcess.StartInfo.Arguments = "--decrypt --password=" + password + " \"" + inputFilePath + "\" \"" + outputFilePath + "\"";
- // Start Process
- decryptProcess.Start();
- // Wait for process to complete
- decryptProcess.WaitForExit();
- // Check for sucessful completion
- return (decryptProcess.ExitCode == 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement