[英]Saving a pdf file opened in Adobe Reader by a process in c#
我正在尝试通过“进程”在 Adobe Reader 中打开文件,因为 Adobe Reader 可以自行修复损坏的文件,但我还需要在代码级别从那里“另存为”文件,而无需手动保存,在 .net 中是否可能?
我正在使用的代码:
Process p = new Process();
p.StartInfo.FileName = file;
p.Start();
//Code to Save As this file
p.Close();
corrupt = true;
inputDocument = PdfReader.Open(file, PdfDocumentOpenMode.Import);
您可以通过使用 Windows 中内置的 AutomationAPI 戳应用程序来做到这一点。
TestStacks.White 是我过去用于自动化 UI 测试的自动化包装器,但它也可以满足您的要求: https://teststackwhite.readthedocs.io/en/latest/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.