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!
Thank you for the very fast response. One follow-up question:
Assume I buy Adobe Acrobat to develop this application and use OLE to interact with pdf documents in the application.
Will my clients need to also buy Adobe Acrobat for the application to work on their computers? Or can I package it with my application behind the scenes?
Thanks again!
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).
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?)
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
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?
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
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
North America
Europe, Middle East and Africa
Asia Pacific