Andy Black wrote: > > Some PDF reader applications lock the PDF file they are displaying. One > implication of this is that if a user tries to re-generate a PDF file > from within XXE while that file is currently being viewed in the PDF > reader, then the generation process will result in a "command execution > has failed" message. (Well, at least it does for my configuration > files...). > > My question is this: is there a way within the XXE configuration files > to detect if the PDF file that is about to be generated is in a state > where this situation will happen? If so, I'd like to then give the user > a message saying that they need to remove the PDF from their PDF reader. > > I'd be happy with any kind of detection such as > cannot delete the file > file is being used by another application > the reader has the file open already > or any other conceivable way to detect this situation. I want to avoid > users being confused by this scenario. Most likely they will think > something on the order of "I just created the PDF file a few minutes > ago. Why won't it generate it now?" and be frustrated. >
The error message issued by the operating system should be crystal-clear in such case. This error message is indeed reported by XMLmind XML Editor. See attached screenshot. Notice the "(Permission denied)" error cause. On Windows, error causes are even more explicit (e.g. "file is being used by another application"). No offense intended, but are you sure that your users actually read what is displayed by the error dialog box before clicking OK? -------------- next part -------------- A non-text attachment was scrubbed... Name: error_dialog_box.png Type: image/png Size: 49872 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20090423/b513c9dc/attachment-0001.png

