Copy link to clipboard
Copied
Now I am writing a C# program to detect whether a PDF document is corrupted on Win10 environment. However, I cannot call the AcroRd32.exe to do my job, because this is indeed a Windows Form application rather than a command-line tool.
You know, when AcroRd32 is trying to open a corrupted PDF document, there will be an error dialogue box popped up. However, by writing a C# application, there is no way to detect the existence of an error dialogue box from a third-party Windows application. What I can do is to check the return code of %errorlevel% after running an application, but for a Windows application, there is no difference: the returning %errorlevel% is always 1, regardless whether the Windows application has hit any error.
Nevertheless, in front of a pure command-line based tool, an C# application can check whether it runs successfully or fails: if the returning %errorlevel% value is 0, it means that the command line has completed successfully; other than that, the command line has hit an error and failed.
So can you please show me whether there are any Adobe command-line tools to open or check the status of a PDF document?
Thank you in advance for any help.
Copy link to clipboard
Copied
The Adobe Acrobat version I am using is:
Adobe Acrobat Reader DC, Continuous Release, Version 2020.006.20042
Copy link to clipboard
Copied
Acrobat Reader is not a validation tool. Nor is Acrobat Pro. No comprehensive checker tool exists. However, automation of Acrobat (not Reader) via a C++ plugin could open a file invisibly; it would probably not stop with errors, but it would also not detect many of them.