Unable to open PDF file with Acrobat Reader DC while white spaces in file path

pdf

#1

Scenario: Trying to open a pdf file with Acrobat Reader DC

Steps to reproduce: Use either Start Process or Open Application action on Acrobat Reader DC executable file and file path (with whitespaces e.g. C:\My Company\My Invoice.pdf) to an existing pdf on local disk in arguments

Current Behavior: Acrobat Reader opens, but with with “This file cannot be found message”. This works fine, if there are no white spaces in the file path though

Expected Behavior: Indicated pdf file is opened

Studio/Robot/Orchestrator Version: 2016.2.6402 (Community)

Last stable behavior:
Last stable version:
OS Version: Windows 10
Others if Relevant: (workflow, logs, .net version, service pack, etc):


#2

Hey @ArtiSta

That is Know thing.

Just Use Trim with your file name while using it with start process activity.

String File_path_variable = “D:\Test.pdf”;

in Start Process - File_path_variable.Trim();

Regards,!!
Aksh


#3

Hi @aksh1yadav

Thanks for the hint, but unfortunately it didn’t solve the issue.
I also tried replacing whitespaces with %20 but it didn’t work either.

Brgds
Arek


#4

It should work . it worked for me many times. faced same issues.

Can you share the path ? which is creating prob for you?


#5

Sure.
e.g. “C:\My Company\Invoice 1708057.pdf”

Trying to find the problem I changed the folder name to MyCompany and removed the spaces from the file name and it worked fine. For any pdf with whistespaces in the path (no matter if the white spaces are in the folder name or file name or both), Acrobat is unable to open the file.


#6

Please find the xaml file I have used to open pdf file. It works.3.xaml (4.3 KB)


#7

Oh, well. Never thought of using the file path as execulatble path … To easy to be true :wink:
Thanks, @BikashPanigrahi.

In the meantime I just resolved the problem with placing the file path in the arguments section - all I needed to do, was to place the path in another pair of double-quotes (e.g. Chr(34)+“C:\My Company\Invoice 1708057.pdf”+Chr(34)).

Thanks for help guys!