Skip to main content
_flaviu
Participant
March 7, 2018
Answered

My first MFC PDF app

  • March 7, 2018
  • 3 replies
  • 1645 views

Hi all of you. I have downloaded the sample project from the server, and I have compiled with VS2008. I have compiled ActiveView sample project. No errors ... but when I run this app, I got this error:

Failed to create object :<

at CMainFrame::CMainFrame(),

MainAcroApp = new CAcroApp;

COleException e;

if (! MainAcroApp->CreateDispatch("AcroExch.App",&e))

  AfxMessageBox("Failed to create object :<");

and MainAcroApp has the following m_lpDispatch value: 0x000000

of course, something went wrong ... but what ? Is there any condition to run these sample projects ? Could you assist me in order to solve this ?

Thank you.

This topic has been closed for replies.
Correct answer Test Screen Name

You don't need to buy the SDK. It is free, and you have it, or you have some of it anyway. But the clue is in the name. It is the "Acrobat SDK". You say there is no Readme, but the SDK includes an extensive Developer FAQ which is essential reading.

Now, suppose you had the "Windows SDK". Would you expect to use that on a Mac, without buying Windows? Of course not. So, the Acrobat SDK is for people who buy Acrobat. If you don't know the difference between Acrobat Reader (free) and Acrobat (paid for) please study, this is essential knowledge which Adobe will assume that you have, because the SDK documentation is built on it.

3 replies

Legend
March 7, 2018

The most common problem is forgetting to buy (or subscribe to) and install Acrobat. It is the Acrobat SDK, for automating Acrobat, not a free PDF Toolkit.

_flaviu
_flaviuAuthor
Participant
March 8, 2018

So, I could not run this sample project without buy SDK from Acrobat ?

Bernd Alheit
Community Expert
Community Expert
March 7, 2018

What version of Adobe Acrobat do you use?

_flaviu
_flaviuAuthor
Participant
March 8, 2018

I have downloaded version 10 as sample projects ... and I didn't found any "readme" file or something that aware me what I need have in order to run these samples ...

Test Screen NameCorrect answer
Legend
March 8, 2018

You don't need to buy the SDK. It is free, and you have it, or you have some of it anyway. But the clue is in the name. It is the "Acrobat SDK". You say there is no Readme, but the SDK includes an extensive Developer FAQ which is essential reading.

Now, suppose you had the "Windows SDK". Would you expect to use that on a Mac, without buying Windows? Of course not. So, the Acrobat SDK is for people who buy Acrobat. If you don't know the difference between Acrobat Reader (free) and Acrobat (paid for) please study, this is essential knowledge which Adobe will assume that you have, because the SDK documentation is built on it.

Thom Parker
Community Expert
Community Expert
March 7, 2018

Don't use MFC.  Write this app in VB or .Net.  There's way too many issues with managing this OLE interface in MFC. I believe there is an example in the SDK docs that shows code examples for the different languages. 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
_flaviu
_flaviuAuthor
Participant
March 8, 2018

I know MFC only , so I cannot use another language ...