通过c#程序保存在Adobe Reader中打开的pdf文件。

问题描述 投票:0回答:1

我试图通过 "进程 "在Adobe Reader中打开该文件,因为Adobe Reader可以修复损坏的文件本身,但我需要在代码层面上 "保存为 "该文件,而不是手动保存,这在.net中可能吗?

我使用的代码是.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);
c# .net pdf save-as
1个回答
0
投票

你可以用Windows中内置的AutomationAPI戳一下应用程序。

TestStacks.White是我过去用于自动化UI测试的自动化包装器,但它也可以做到你所要求的。https:/teststackwhite.readthedocs.ioenlatest。

© www.soinside.com 2019 - 2024. All rights reserved.