Skip navigation
Currently Being Moderated

AcroExch.App with Adobe Reader

Sep 14, 2010 12:46 PM

If a computer only has Adobe Reader installed, can an application running on that computer interact with a pdf document via OLE?  In particular, can an application on that computer use AcroExch.App and AcroExch.AVDoc objects?

 

Example code:

 

#import "acrobat.tlb" rename_namespace("ACROBAT"), auto_rename

 

ACROBAT::CAcroAppPtr app("AcroExch.App");

ACROBAT::CAcroAVDocPtr avDoc("AcroExch.AVDoc");
ACROBAT::CAcroPDDocPtr pdDoc;

 

avDoc->Open(TEXT("c:\\example.pdf"), TEXT(""));

pdDoc = avDoc->GetPDDoc();
pdDoc->OpenAVDoc("Title");

 

Currently creating app gives error: Invalid class string

 

Thanks!

 
Replies
  • Currently Being Moderated
    Sep 14, 2010 1:03 PM   in reply to Daktor

    > If a computer only has Adobe Reader installed, can an application  running on that computer interact with a pdf document via OLE?

     

    No,

     

    > In  particular, can an application on that computer use AcroExch.App and  AcroExch.AVDoc objects?

     

    No.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 14, 2010 1:04 PM   in reply to Daktor

    No, it cannot.  Reader doesn't support COM/OLE automation.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 14, 2010 1:34 PM   in reply to Daktor

    Yes, your clients would need to purchase Acrobat for your application to work.  It needs to be installed on every computer on which your software would operate.

     

    And remember that Acrobat can NOT be automated to do work for someone not licensed to use it....

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 7:36 AM   in reply to lrosenth

    Related to this post, lets say I get the approval from Adobe (RIKLA stuff), will these classes work for Reader plugin?

     

    i.e AcroAppClass and CAcroPDDoc

     

    If not, what are the Reader plugin APIs available in SDK that does text extraction and highlight functionality in Reader (which is my only 2 requirement now).

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 8:04 AM   in reply to athirukk

    No, because they simply do not exist in Reader.  They only exist in Acrobat.

     

    But if you are writing a plugin, why do you need them?  There are much better APIs (PDWordFinder, etc.) available to you via plugins...

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 8:48 AM   in reply to lrosenth

    What I was trying is to get hold of ActiveDoc once I pass on the control from Plugin code to my C# code, so that I can extract text and do the highlight stuff with the help of AcroAppClass  and CAcroPDDoc.

     

    Ok. PDWordFinder will solve one of my problem as it will work for Reader. Now I can extract text from a Reader document and send it to my C# Form from plugin.

     

    Now, from that Windows Form code, how can I highlight a particular word back in the PDF document. Is there a Reader supported API (#HiliteEntry?)

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 8:56 AM   in reply to athirukk

    Yeah, that won't work with Reader - sorry!  You will need to do the extraction in the plugin and then send that extracted text to the C# code.

     

    You will need to send info back to the plugin to tell it what you want hilited and then it can do it...

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 9:05 AM   in reply to lrosenth

    Thats great,atleast I have a way to talk back to Reader document from C#.

     

    Can you please point me some SDK sample code which does this handshake? Meaning, invoking the plugin method from outside plugin code (in my case from C# Winform to plugin code to highlite a word).

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 10:38 AM   in reply to athirukk

    Sorry, no samples of this type of thing - but that's because it's not Acrobat/Reader centric.  Do whatever you want to communicate...

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 7, 2010 11:58 AM   in reply to lrosenth

    Thanks!

     

    But if there is a sample which atleast invokes a plugin method from outside, that will really help me to proceed further.

    Or any direction of this sort will also helpful.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 9, 2010 8:47 AM   in reply to athirukk

    Can any one answer my previous question?

     

    I am searching SDK documentation and I found something called HFT. Is that the solution for my requirement, i.e invoking a plugin method from outside?

     

    Please let me know.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2011 1:42 PM   in reply to athirukk

    Replying to my own questions above....found a DDE (very old IAC technique and not usually recommended tough ) way to talk to Acrobat/Reader instance (called as DDE Server). There is a sample project which demonstrates DDE and it is in C++.

     

    As I need to talk from my Winform, I am gonna use Ndde (open source) to talk back to Acrobat/Reader instance.

     

    It would be more helpful if some sample code/project is available in SDK to demonstrate IAC via COM/OLE as DDE is a very old technique.

     

    -AT

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 11, 2011 2:14 PM   in reply to athirukk

    Adobe Reader doesn't support COM/OLE - only DDE.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 6:45 AM   in reply to lrosenth

    Irosenth, this is kinda contradicting. I remember you were saying "If Adobe approves your Reader plugin, then it can do what ever". Meaning COM/OLE/Named pipes. I thought COM/OLE is available for Reader, but your above reply says it strictly supports only DDE (which is gud for me as I hav explained above, am using DDE to send messages back to Reader instance to invoke the Highlite plugin function ).

     

    Please can you clarify why COM/OLE is not available for Reader and why only old technique, DDE is available for Reader?

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 7:48 AM   in reply to athirukk

    Sorry - OK for you to do from your plugin.  (I was referring to built-in support)

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 12, 2011 8:37 AM   in reply to lrosenth

    Thats convincing to me and good to know that Reader will support IAC via COM apart from DDE. I will try to create a COM component and expose the Highlite API, add reference to my C# Winform and invoke it from there.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 3, 2012 1:06 AM   in reply to athirukk

    Hi Athirukk

     

    from above posts, it appear you have worked good deal to edit pdf docs without using SDK ( with the help of plugins/DDE).

     

    can you please help me what was the result . as i have the similar issue (ActiveX is not able to create objects for data points i have in the code @  http://forums.adobe.com/message/4109842 ).

     

    apprciate any guidance.

     

    regards

    Sidharth

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 3, 2012 2:09 PM   in reply to sidharthnitj

    Sid - What I had achieved using Ndde (opensource) is to make a connection from .Net code (Winform) to C++ code (Adobe Plugin). All my code does is to invoke C++ code from .Net to retrieve (read only) the contents/text of a PDF document and I did not do any EDITING.

     

    What are you trying to achieve?

     

    -AT

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2012 5:26 AM   in reply to athirukk

    athirukk- i need to write reference text on pdf docs..with acrobat this is possible as confirmed by Irosenth....however was thinking if it is possible without spending any money...

     

    i will look at ndde....however any direction u want me to point ..

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2012 5:51 AM   in reply to sidharthnitj

    Without spending money you can't create plug-ins for Adobe Reader.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 4, 2012 7:15 AM   in reply to sidharthnitj

    As Bernd mentioned, you have to get RIKLA from Adobe to make your plugin work for Reader.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points