1. Tracy Lamb
  2. PowerBuilder
  3. Friday, 10 February 2023 18:51 PM UTC

Hi all,

I've added the ability to "attach" pdf documents in several places in my app.  I also added "view" capability, that opens the pdf in a web browser.  One of my customers wants to "open" the pdf in Acrobat (or other pdf app) to make some edits and save it back to it's original location.

Is there a way to launch the pdf program with the file name to open?

TIA,
~~~Tracy

Accepted Answer
Tracy Lamb Accepted Answer Pending Moderation
  1. Tuesday, 14 February 2023 01:41 AM UTC
  2. PowerBuilder
  3. # Permalink

So here's what I did...

Used the n_runandwait nvo, I think Roland recommended this in the first place (a while ago) ... have used this nvo in several places (again, a while ago). 

Created a function that calls the ShellRun function...

lb_opened = lnv_runandwait.ShellRun( as_directory + as_filename, "open", 1)

"open" will open the Window's program associated with PDF files... may not be Adobe (PDF Creator comes to mind).  

My customer hasn't gotten back to me, I'm assuming this solved the "issue" he was having.  If not, I'll retract my solution.

~~~Tracy

 

 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 13 February 2023 08:30 AM UTC
  2. PowerBuilder
  3. # 1

Hi Tracy.

What isn't clear to me is if he wants to edit the pdf or based on data in the pdf to make some changes to the application.

Andreas.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 February 2023 00:44 AM UTC
Then you need to use Adobe directly by using PB's OLE feature. ;-)
  1. Helpful
  1. Tracy Lamb
  2. Tuesday, 14 February 2023 02:03 AM UTC
Chris, no guarantee the customer is using Adobe.... I think Roland's RunAndWait nvo is a great solution.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 14 February 2023 02:17 AM UTC
Yes, a great alternative! :-)
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 10 February 2023 19:09 PM UTC
  2. PowerBuilder
  3. # 2
Comment
  1. Tracy Lamb
  2. Tuesday, 14 February 2023 01:44 AM UTC
Thank you Roland... should have checked that first. I've been using RunAndWait for a couple years!

~~~Tracy
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 10 February 2023 19:07 PM UTC
  2. PowerBuilder
  3. # 3
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.