News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Acrobat reader and asm

Started by ToutEnMasm, November 18, 2010, 01:39:01 PM

Previous topic - Next topic

ToutEnMasm

I try just to use .pdf as normal help files like .chm .hlp....
I want to Call once the prog and then choose a topic in it.
I have the needed material,AcroRd32.sdk a translate of the headers but i haven't the user mode.
I can connect to the IAcroAXDoc interface but have no samples or documentation to use it's proto.
Sources provided are a draft.
Other's Headers can be found in the masm32/windows.inc subforum ,subject "ready to use SDK"

dedndave

hi Yves
you might have a look here...
http://forums.adobe.com/community/acrobat/acrobat_sdk

i also found a small example in the PowerBasic forum, although it is quite old
http://www.powerbasic.com/support/pbforums/showpost.php?p=222359&postcount=6

from what i gather browsing the adobe sdk forum, there are examples in the sdk - maybe you just haven't found them   :P

you may not find any ASM examples - you might have to translate from some other language

ToutEnMasm


I have the sdk.There is an interesting sample in
QuoteE:\Adobe\Acrobat 9 SDK\Version 1\InterAppCommunicationSupport\CSamples\ReadPdfPrcVC
But as always , use MFC with afx files just to show a filedialog box,a messagebox and ...
The class who do it isn't of the good version(as always).Chance I correct it.
Bad chance need other libraries that are not named for the compile.
Perhaps i can made something with those who have been compiled (another chance).
There is no one library compiled in this sdk.


ToutEnMasm

A little info: open a pdf
With just a problem : No clsid AcroApp in my register base
Quote
      CAcroApp * pAcroApp = new CAcroApp();
      pAcroApp->CreateDispatch(TEXT("AcroExch.App"), &e);

      CAcroAVDoc * pAcroAvDoc = new CAcroAVDoc();
      pAcroAvDoc->CreateDispatch(TEXT("AcroExch.AVDoc"), &e);

      if(!pAcroAvDoc->Open(strPathName, strFileName)) {
         CString strMsg = TEXT("Failed to open file ");
         strMsg += strFileName;
         strMsg += TEXT("!");
         AfxMessageBox(strMsg);

         delete pAcroAvDoc;

         pAcroApp->Exit();
         delete pAcroApp;
         return FALSE;
      }

      pAcroApp->Hide();

      if (_waccess(strXmlFileName, 00) != -1)
         _wunlink(strXmlFileName);
      ExportFromPRC(strPathName);
      Display3dData(strXmlFileName);

      pAcroAvDoc->Close(1);
      delete pAcroAvDoc;

      pAcroApp->Hide();
      pAcroApp->CloseAllDocs();
      pAcroApp->Exit();
      delete pAcroApp;


dedndave

i read a few of the posts in the sdk forum
it appears that you have to have adobe acrobat (not adobe reader) to have that   :P

ToutEnMasm

Too bad
I have just to use the line parameters instead

dedndave

hey, Yves
i found this site - they have a forum and source code you may download   :U

http://www.pdfforge.org/download

baltoro

#7
Hi,
A couple of months ago, I was trying to write an experimental app to do something similar to what you coded above.
I DO have Adobe Acrobat installed on my computer (although, it's an older version, 5.0). And, I found that there are several COM type libraries that are included with the Acrobat installation, (I opened them both in the COM/OLE Object Viewer), neither of them exports a coclass with CLSID that can be registered and instantiated with CoCreateInstance. There are, however, a number of associated DLLs that didn't seem to be either In-Proc servers or ActiveX controls,...and so, I didn't open them in Dumpbin or a Hex Editor to take a look (that would be like cheating,...right?).
However, in searching my registry for CLSID subkeys that had the path to the executable as data, I found several registered coclasses that the main executable exports (but, no type library that defines them). These are classes like AcroDoc and the various elements that be found inside an AcroDoc, but, no AcroApp class, that you could to instantiate the actual Adobe Acrobat executable. I finally gave up.
Baltoro

dedndave

let me see if i remember right
some stuff comes with a purchased copy of acrobat
some stuff is in the sdk
i don't recall if you have to have a purchased copy of acrobat to get the sdk

baltoro

The last time I visited the Adobe web site, you could download the current version of the SDK for free (and, you didn't have to have a valid product activation code).   
I don't think it came with my old install. Finding an SDK version to match an older version is next to impossible, I think.
...but, the 'some stuff',...yeah,...I got that,... :eek
The point of my above post is that, the main Acrobat exe probably has it's own internal interface (that is NOT exported publically -- there is no exported function, like GetClassObject), and it then instantiates helper interfaces from the included DLLs. And, well sorry, but this information is probably COMPLETELY useless to Yves, since he has a much more recent version of the SDK. However, the same technique may be used in the more recent SDK, (and, more recent versions of the Acrobat executable)...that the interface for the main CAcroApp is not exported publically from Acrobat. I'd guess the SDK is for writing applications to convert documents to the PDF format, and not to create a clone of the actual Adobe Acrobat executable.
...But, of course, I COULD be wrong ( :bg I usually am),...
If anyone can figure it out,...it is Yves,...and I will be embarassed, but, will gladly use the information.
Baltoro