1. Deva Shanmuga
  2. PowerBuilder
  3. Saturday, 2 September 2023 12:12 PM UTC

Hi Experts,

I am trying to connect pdf application through ole object. Here I am mentioning the syntax :

OLEObject ole_1

ole_1 = CREATE OLEOBJECT

ole_1.ConnectToNewObject("AcroExch.Document")

ole_1.ConnectToNewObject("AcroExch.App")

ole_1.ConnectToNewObject("AcroExch.PhDoc")

I have tried all the methods.

I am getting -3 as return value.

 

Can anyone give suggestion please ?

 

Thanks in advance.

Deva.s

 

 

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 16 September 2023 21:25 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi,

I downloaded Acrobat Reader and tried. Indeed I'm also getting -3 as a return value.

Then I realised that the Acrobat Reader you download is 64 bit and I'm running 32 bit Powerbuilder.

So I googled a bit and found this: https://community.adobe.com/t5/acrobat-discussions/installing-acrobat-dc-32-bit-on-a-64-bit-machine/td-p/12655343

with a link to the 32 bit version here: https://trials.adobe.com/AdobeProducts/APRO/Acrobat_HelpX/win32/Acrobat_DC_Web_WWMUI.zip

When you unzip the downloaded file, run the "setup.exe" (I first uninstalled the 64 bit version).

When the install ends, as prompted by the installer, launch Acrobat, you never know if initially you'll be prompted to do whatever ...

Close Acrobat and then run this code, now it works (at least for me) !!!

So keep a copy of your downloaded 1.1 GB zipped installer, as it might disappear from the web one day.

(Now I'll uninstall Acrobat (2.7 GB just to read a PDF file), as I absolutely hate this program. I use "PDF-Xchange Viewer", fast and light weight).

 

regards,

MiguelL

 

Comment
There are no comments made yet.
Deva Shanmuga Accepted Answer Pending Moderation
  1. Saturday, 16 September 2023 19:05 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

For using the Adobe Acrobat, whether I need License version or it is not necessary.

 

Thanks 

Deva.S

Comment
  1. John Fauss
  2. Saturday, 16 September 2023 19:44 PM UTC
Since you have not described what task(s) you are wanting to accomplish, it is impossible for me to say. If you are wanting to only display a PDF, then the free Acrobat Reader product should suffice, or the new WebView2-based web browser control in PB 2022 R2 may be sufficient. If you need your application to modify an existing PDF, then you will probably need to purchase the full Acrobat product for every workstation, or find an alternative (that is to say, a non-Adobe) product.

When you provide no information about your PB development environment (version, release & build) and no description as to what you need to accomplish, you will receive only very generic responses.

I suggest you start over; ask a new question in a new thread that describes in detail your PB environment and what you need your application to do. This will increase the likelihood that someone in the Community can offer you some guidance.

Good luck!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 2 September 2023 17:28 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Deva -

What are you wanting to accomplish? What version/release/build of PB are you using? What Adobe products do you have installed?

If you are wanting to manipulate/modify a PDF document via OLE from your PB application, that will require Adobe Acrobat to be installed on your development machine as well as any machine that runs your application. If you only need to view and/or print an existing PDF document via OLE, this will require either Acrobat or Acrobat Reader to be installed. As its name implies, Acrobat Reader does not support making changes to a PDF document.

If neither of these products are installed, then the behind-the-scenes, internal "plumbing" that OLE uses to facilitate cross-application communication to an Acrobat-related product will not exist.

The most recent version of PB (2022 R2) can now perform some manipulation of PDF documents without using OLE using new, native PB objects designed for the task:

    https://docs.appeon.com/pb/whats_new/PDF_Builder_enhancements.html

Best regards, John

Comment
  1. Deva Shanmuga
  2. Saturday, 16 September 2023 19:05 PM UTC
For using the Adobe Acrobat, whether I need License version or it is not necessary.
  1. Helpful
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.