replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Calling Acrobat to display a PDF
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calling Acrobat to display a PDF

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Fri Mar 27, 2015 1:51 am    Post subject: Calling Acrobat to display a PDF Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Fri Mar 27, 2015 8:22 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Fri Mar 27, 2015 1:07 pm    Post subject: Reply with quote

Try
Code:

      CALL USE_URL@('Myfile.pdf')
Back to top
View user's profile Send private message Send e-mail
wahorger



Joined: 13 Oct 2014
Posts: 1257
Location: Morrison, CO, USA

PostPosted: Fri Mar 27, 2015 3:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Fri Mar 27, 2015 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
aldavhu221



Joined: 13 Apr 2011
Posts: 13

PostPosted: Sat Mar 28, 2015 3:38 pm    Post subject: Reply with quote

Thanks for your help.

Bill's suggestion worked fine but one small point: it should be 'explorer' not 'explore'.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group