Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute() and Chrome?
Message
 
 
To
25/01/2019 10:52:45
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01665727
Message ID:
01665732
Views:
57
>>Hi,
>>
>>I connect to a customer server (RDP) and then run a certain routine in the VFP 9 application that is suppose to open a PDF file. The opening is done by the following command:
>>
>>=Shellexecute(0, "open", cFileName, 3, "", "")
>>
>>
>>The PDF file is opened but it looks like it shows in the Chrome and not Adobe Reader.
>>
>>Could it be that the Chrome would open PDF file way?
>>
>>Also, the File:// line at the top shows the PDF name with all empty spaces replaced by "%20" Is this added by Chrome? For example:
>>
>>file://server_name/app_name/documents/fs1%20hartness-meur%20nf.pdf
>>
>>
>>
>>TIA
>
>You are simply passing filename.pdf, right? (Instead of passing pdf as a parameter to acrobat executable)
>Then pdf would be opened with whatever application it is registered to open with on that machine. If you want to use acrobat, then change the association (right click a pdf, properties- opens with).
>
>When it is a browser, its name would normally use %20 for spaces and also other hex values for some characters.

Yes, I was simply passing the filename.pdf. The reason for this question is that the customer was getting an error when trying to print the .PDF (when VFP application was running ShellExecute(...)). And yet I was able to open the .pdf file from the application (for read/view) but not print. When printing, the error "No Association" would pop up.
Now, I realize that they probably do not have the acrobat reader installed. Otherwise, the opening would be done by the acrobat reader.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform