On 4/23/2009 12:16 AM, Hussein Shafie wrote:
> 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?
>   

No offense taken, Hussein.  I, too, create computer software and have at 
times wondered why something was not clear to a user.  Over the years 
I've been trying to learn to think more like a user than a programmer 
which is no small challenge...  (By the way, have you ever read Alan 
Cooper's book, "The Inmates Are Running the Asylum"?)

The reason I wrote is precisely because some users will struggle with 
seeing the dialog box with so much technical information.  When the 
PDF-generation process succeeds, the user just sees the dialog box 
appear for a while and then it goes away without the user having to 
press any buttons.  How long it appears, of course, will depend on the 
size of the document and the speed of the user's machine.  So when the 
dialog box does not go away, they experience an abnormal situation. 

These users are not computer-savvy people.  They just want to write 
their document and turn it into PDF.  And this, by the way, is one 
reason I am so pleased with XXE - it makes doing this so much simpler 
than any other application or XML editor I have ever seen.  XXE is way 
ahead of the others in ease of use for writing.  Solving this one area, 
however, would help XXE become even more user-friendly.

Also, as Rishi Khan noted, while the dialog box does give the technical 
reasons for the problem, it does not provide the (computer-naive) user 
with the solution to the problem.  And that is what I was hoping to 
provide the user so that his/her experience in using XXE would continue 
to be a pleasant, productive one.

So, if you could ponder how this might be done, I think many XXE users 
would be very grateful (although you might never hear them say so; 
people do tend to complain much more than they compliment).

Thanks for considering this,

--Andy

Reply via email to