Close PDF

Hi guys,

I’m trying to close a pdf open in Adobe Acrobate Reader with UIPath.
I tried via Hotkey “Contrl+Q” and also via “kill Process” but adope is not answering at all.

image

Any ideas how I can fix that?
Many thanks!

1 Like

Hi @Markus3003 ,

Have you tried Close Application Activity??

@Markus3003 - in the kill process just give Adobe…or send hotkey alt f4

You can check the Adobe Acrobat Reader process name in Task manager

image

You can try 64 if it is not working

@Pradeep_Shiv, yes I also tried that.

@prasath17, I just gave only “Adobe” and I tried also hotkey alt f4

@Eric_Wong_Test, I also tried that.

Adobe is no reacting at all, do I maybe need some extensions oder special settings for that?
Thanks!

may be use send hotket alt + f and then send hotkey x

Screenshot 2021-03-18 200728

Hi !
Can you screenshot in your Task Manager the line of Adobe and show it to us ?

image

Right-click go to detail

image

but also with “AcroRd32” it is not working

Try to add the .exe to see if it makes a difference

Screenshot 2021-03-18 200728

Just try it, I have success it in Adobe Acrobat Reader, but the hotkey may not same with Adobe Acrobat Reader2017

I’m using sth like that to kill process (i added it as activity in my company framework):

Properies:
image

image

image

image

Values:

str_ProcessName = str_ProcessName.toLower

condition for IF: arr_ProcesySystem.Any(Function(x) (str_ProcessName).Equals(x.ProcessName.ToLower))

Condition for bool: arr_ProcesySystem.Any(Function(x) (str_ProcessName).Equals(x.ProcessName.ToLower))

You can write “AcroRd32” as default value in variables Panel or create other workflow, with argument in “str_ProcessName” and invoke it in place where u need it. I recommend to manually open some PDF document and try only that code to check if it’s killing adobe properly.

This code will check running processess and kill process valued in str_ProcessName. after that it is checking if process is still in run. If it’s true it repeats (maximum 30 times).

makes no difference :confused:

@Eric_Wong_Test if I use hotkeys without UIPath directly in the pdf it works, like “Control+Q”, but if i add those in the Workflow the adobe is not reacting…

@Markus3003

What is happening after this?

Can you first try to end the task from Taskbar manually and see if it is working fine?

Hi Pravin,

what do you mean with “end the task from Taskbar manually”?

As mentioned I can close the Adope Reader via Shortcut manually for excample, but in the UiPath workflow neather the shortcuts nor kill/close activities are working in my case :confused:

Thank you!

Hi @Markus3003

Please try this (just trying to debug)

For Each p As Process In System.Diagnostics.Process.GetProcessesByName(“AcroRd32”)

		p.Kill
	
Next

Basically the same thing what a kill activity is doing, but give this a try in invoke code