Close a PDF from Uniface
Author: bignonj@gmail.com (Bignon)
Hi,
Can I close an open PDF with Adobe Reader from Uniface ?
I open the PDF with activate WIN30.SHELLEXECUTEA(O,"open","%%vNomfichier%%%","","",1)
Perhaps work on the Id Process but how can I do that ?
Thanks a lot,
Jérôme Bignon
8 Comments
Local Administrator
does it support only closing Adobe software, how about other pdf reader, does it support? i am now using this pdf software to view and open pdf, but i want to close it in Uniface, will it possible? can i get any codes and tutorials? thank you
Author: lucyimage (lucyimage@hotmail.com)
Local Administrator
Hi Jerome,
What about sending a DDE-execute to the PDF-reader process ?
Success, Uli
P.S. as usual, just a brainstorm result. If it does not fit your needs, tell me.
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
Hi Uli,
And how do that ?
You want to say make a Jscript file, by example, ( with inside a fonction to close Adobe Reader), and execute this Jscript from Uniface by spawn ?
Author: Bignon (bignonj@gmail.com)
Local Administrator
Hi Jerome,
you can use DDE straight from the uniface application:
Setup of INI File to use DDE
dde=1
2-1 $50 = A50
3-1 $51 = A51
4-1 $53 = A53
5-1 HISTORY = "*** %%Function ***%%^%%HISTORY"
6-1 HISTORY = "IN $53 Data = >%%$53<%%^%%HISTORY"
7-1 HISTORY = "IN $51 Topic = >%%$51<%%^%%HISTORY"
8-1 HISTORY = "IN $50 Service = >%%$50<%%^%%HISTORY"
9-1 $result = ""
10-1 perform "UDdeExecute"
11-1 HISTORY = "%%Function Stat/Res= %%$status >%%$result<%%^%%HISTORY"
12-1 done
13-1 endif
14 if (Function = 'uddepoke')
15-1 HISTORY = "*** %%Function ***%%^%%HISTORY"
16-1 $50 = A50
17-1 $51 = A51
18-1 $52 = A52
19-1 $53 = A53
20-1 HISTORY = "IN $53 Data = >%%$53<%%^%%HISTORY"
21-1 HISTORY = "IN $52 Item = >%%$52<%%^%%HISTORY"
22-1 HISTORY = "IN $51 Topic = >%%$51<%%^%%HISTORY"
23-1 HISTORY = "IN $50 Service = >%%$50<%%^%%HISTORY"
24-1 $result = ""
25-1 perform "UDdePoke"
26-1 HISTORY = "%%Function Stat/Res= %%$status >%%$result<%%^%%HISTORY"
27-1 done
28-1 endif
29 if (Function = 'udderequest')
30-1 $50 = A50
31-1 $51 = A51
32-1 $52 = A52
33-1 HISTORY = "*** %%Function ***%%^%%HISTORY"
34-1 HISTORY = "IN $52 Item = >%%$52<%%^%%HISTORY"
35-1 HISTORY = "IN $51 Topic = >%%$51<%%^%%HISTORY"
36-1 HISTORY = "IN $50 Service = >%%$50<%%^%%HISTORY"
37-1 $result = ""
38-1 perform "UDdeRequest"
39-1 message "%%$status %%$result"
40-1 A53 = $53
41-1 HISTORY = "OUT $53 Data = >%%$53<%%^%%HISTORY"
42-1 HISTORY = "%%Function Stat/Res= %%$status >%%$result<%%^%%HISTORY"
43-1 done
44-1 endif
Success, Uli
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
Hi Jerome,
On your question, I have another question :
How do you have implemented WIN30.SHELLEXECUTEA. ?
I wants replace all spawn comman by the shell execute but I have not the signature.
Regards,
Antoine
Author: apicaud (antoine.picaud@free.fr)
Local Administrator
Hello Jerome,
I have created a form component several years ago in which we can show a PDF-document. It is based on the Internet Explorer which can show a lot different type of documents like Word, Excel, PDF and DWF, provided that the plugin is installed. Just paint a OCX-container on the form and use the Shell.Explorer. In your program add the statement
$ocxhandle(ocx) -> navigate($URL$, "", "", "", "")
where $URL$ can be a fully qualified filename but also an url to a website.
This form can be closed any way you like, closing the PDF as well.
Hope this helps,
John Bergsma
Author: bergsma (john.bergsma@upcmail.nl)
Local Administrator
Thanks for all your messages. Uli, i look your soluce.
Antoine, look at http://www.uniface-dev.com/pdf/internet_1.pdf for the ShellExecuteA, it's a solution on my website.
Cordialement,
Jérôme
Author: Bignon (bignonj@gmail.com)
Local Administrator
It is a great help. Closing PDFs and Scanning to PDF sometimes make me confused.
Author: johnland (johnland8193@gmail.com)