Einzelnen Beitrag anzeigen

ulrich.b

Registriert seit: 21. Sep 2005
Ort: Kattau (AT)
79 Beiträge
 
Delphi 2009 Professional
 
#1

Acrobat Reader COM / OLE API

  Alt 4. Apr 2008, 14:07
Ich habe versucht, die Acrobat Reader COM API anzusprechen, und bin klaglos gescheitert.

Wenn man in C# eine Instanz von "AcroApp" zu erstellen bekommt man eine COMException:
"Retrieving the COM class factory for component with CLSID {85DE1C45-2C66-101B-B02E-04021C009402} failed due to the following error: 80040154"

Das ganze hab ich versucht mit einer Acrobat Reader 8.1.2 Installation (auf 2 versch. Systemen)

Sogar das in der SDK mitgelieferte Beispiel (BasicIacCS.cs) bricht an genau dieser stelle ab:


Code:
      private void StartAcrobatIac()
      {
         //IAC objects
         CAcroPDDoc pdDoc;
         CAcroAVDoc avDoc;

         //constant, hard coding for a pdf to open, it can be changed when needed.
         const string szPdfPathConst = "C:\\sample.pdf";

         //variables
         string szStr;
         string szName;
         int iNum = 0;

         mApp = new AcroAppClass(); //// <==== Exception !!!!

         //Show Acrobat
         mApp.Show();

         //set AVDoc object
         avDoc = new AcroAVDocClass();

         //open the PDF
         if (avDoc.Open (szPdfPathConst, ""))
Hat jemand von euch schon mit der Reader COM API gearbeitet??

EDIT: Ich hab noch das gesamte Sample (direkt aus dem SDK) hinzugefügt, ... falls es jemand selbst ausprobieren will
Angehängte Dateien
Dateityp: rar basiciaccs_124.rar (6,8 KB, 4x aufgerufen)
  Mit Zitat antworten Zitat