|
<< Click to Display Table of Contents >> Navigation: Telegram > 2018 > 03 > 15 > Telegram_2018-03-15T11 |
2018-03-15T11:36:22
Before installing as a service in my intraweb application, this app transmitted pdf files and showed them on the screen, but now it does not do so since it is a service.
I use a web service to send the pdf file to the intraweb application and from the intraweb application I use the Execute shell to show it on the screen, now it just does not show it, neither locally on the same server nor remotely accessing the server from another net.
2018-03-15T11:36:36
why?
2018-03-15T11:37:01
Services dont run inside a Windows desktop and therefore cannot interact with the shell etc.
2018-03-15T11:37:53
To this you need to run the server under an active desktop session, or split the server into 2. Normally the server is not meant to be interactive with the desktop and usually PDFs are displayed via the browser on the client.
2018-03-15T11:38:19
Depending on your goal what you are doing may be a valid case, but you will have to make special changes to do it.
2018-03-15T11:39:04
There is also a legacy option, but its not a good way to do it:
type: link https://superuser.com/questions/415204/how-do-i-allow-interactive-services-in-windows-7
2018-03-15T11:39:26
type: link https://msdn.microsoft.com/en-us/library/windows/desktop/ms683502%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
2018-03-15T11:40:41
My goal is for a user to enter the page and, when given an ID, show a PDF document.
2018-03-15T11:41:07
Where is the user? If a remote user then you need to use the browser anyway because they are not at the server.
2018-03-15T11:41:45
you can send PDFs to the browser to be displayed and that is standard practice. I beleive the demos have a sample that shows this.
2018-03-15T11:42:59
Yes, it is remote, it is necessary to use the browser
2018-03-15T11:43:21
Yes, you have to use the browser. ShellExecute runs on the server.
2018-03-15T11:47:01
I try to show the pdf, but it just completes the task and shows nothing
2018-03-15T11:49:23
Its a legacy option and it wont work in your case anyway. ShellExecute runs on the server. You need to use SendFile and send the PDF to the browser. Check the demos, Im sure one of them demonstrates this.
2018-03-15T11:51:13
type: link https://forums.embarcadero.com/thread.jspa?threadID=227584