PDA

View Full Version : PDF in WebObject -- Acrobat.exe survives...


gvanassche
10-17-2007, 03:55 PM
Dear all,

I just noticed something strange today, and it happens in all the applications I created so far: when I put a PDF in a WebObject, Acrobat.exe remains in the Windows Task Manager (read memory, consuming +/- 35 MB of ram!) even after the application has been closed.

Did anyone else notice the same behaviour?

Is there anything I can do about it?

thanks for your help


gert

mindstitchdr
10-17-2007, 04:09 PM
Yeah it happens on my end too. Thanks for pointing this out. Does anybody know of a way to stop the Acrobat.exe when the app closes?

srussell
10-17-2007, 04:44 PM
You could try getting the WIndow Handle for Acrobat, then close the window before closing down the Autoplay app?

mindstitchdr
10-17-2007, 04:59 PM
The problem is the pdf file opens inside the web object, so there is no window (other than the app) to speak of.

Dermot
10-17-2007, 05:28 PM
Try this
file_to_check_for = "acrobat.exe"; --have all lowercase
processes = System.EnumerateProcesses();

for j, file_path in processes do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
System.TerminateProcess(j);
end
end

mindstitchdr
10-17-2007, 05:49 PM
Works great! Thanks Dermot.

gvanassche
11-08-2007, 02:32 PM
Sorry to respond so late....
This works fine indeed!

Thank you for your help, Dermot!