I have been having trouble to figure out how to check in my program whether a pdf document is currently open or not. This is a major problem, because my program creates pdf documents for my client, but my client reviews her document by opening it and attempts to fix any spelling errors while the pdf document is open, causing the program to crash and lose a lot of progress. I have tried several methods to attempt in detecting whether the program is open or not, to no avail.
This program is a C# desktop application that is used to create pdf documents by using itextsharp.
Can somebody please give me a statement that i can use to check whether the pdf is open or not or being used by another process? My client cannot continue with her work until this is fixed.