View previous topic :: View next topic |
Author |
Message |
aldavhu221
Joined: 13 Apr 2011 Posts: 13
|
Posted: Fri Mar 27, 2015 1:51 am Post subject: Calling Acrobat to display a PDF |
|
|
My Fortran program runs in a CMD window and produces a PDF report.
Currently I give the user the PDF filename and leave it there.
Does anyone know a way of calling ACRORD32.EXE to display the resultant PDF in a regular PC window just before my program terminates?
Can anyone suggest a better way? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Mar 27, 2015 8:22 am Post subject: |
|
|
You might try START_PROCESS@ or START_PPROCESS@. Another possibility is CISSUE@. See FTN95.chm or the online Silverfrost help for details. |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 506 Location: Sunderland
|
Posted: Fri Mar 27, 2015 1:07 pm Post subject: |
|
|
Try
Code: |
CALL USE_URL@('Myfile.pdf')
|
|
|
Back to top |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Fri Mar 27, 2015 3:26 pm Post subject: |
|
|
I use START_PPROCESS@ to display the PDF I create for the user. This way, the program can continue while the PDF is being loaded and displayed.
Code: |
PPNAME = TRIM(OPENED_FILENAME(I))//'.PDF'
return_val = start_pprocess@('explore',TRIM(PPNAME))
|
I call EXPLORE to insure that if the PATH has been mucked with, it will still open the file using the assigned application. It was a bit of a surprise that I needed to do it this way, but then, isn't all of Windows an adventure?
This works for any file for which there is a registered application and OPEN defined. In addition, you can replace "explore" with a specific application if you chose (or need to because of conflicts in the default application).
Bill |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Mar 27, 2015 4:45 pm Post subject: |
|
|
You can put the file in the local folder on somewhere on the PATH environment variable.
If it is on the PATH then there is a Window API for this called SearchPath.
You can find its signature in WIN32API.INS. |
|
Back to top |
|
 |
aldavhu221
Joined: 13 Apr 2011 Posts: 13
|
Posted: Sat Mar 28, 2015 3:38 pm Post subject: |
|
|
Thanks for your help.
Bill's suggestion worked fine but one small point: it should be 'explorer' not 'explore'. |
|
Back to top |
|
 |
|