Pieter van Wyk
Pieter van Wyk

Reputation: 2378

How do I get Acrobat Reader Imported into Delphi 2007?

I have imported Acrobat Reader using Components | Import Components. The AcroPdf_TLB unit is created in the Imports directory.

When I try to use the AcrobatReader component, as follows ...

AcroDoc := TAcroPDF.Create(nil);

... I get an 'Unspecified Error' exception (EOleSysError). Any ideas?

Thanks, Pieter.

Upvotes: 1

Views: 4531

Answers (5)

Jon Samson
Jon Samson

Reputation: 99

We successfully used the acrobat v6 reader component in our Delphi 7 app, but found that it really requires acrobat v6. Users today who install only acrobat v9 get an error when they use our app to view a pdf because the acrobat component is not backward compatible in this way.

So yes, you can do it, but there are probable issues going forward.

A third party tool is prob best...

Upvotes: 0

jrodenhi
jrodenhi

Reputation: 2237

If you are unhappy with the results you are getting there (I was), you might consider giving QuickPDF a try. The price is not unreasonable, they have lots of good PDF functions included and you can display a PDF accurately in a TImage control with a call to RenderPageToStream. One thing I discovered working with form fields is that I had to use their FlattenFormField before rendering to get the form field contents to be included in the rendered image.

Follow up:

I did not mention originally that QuickPDF also works for printing. For form fields, you have to do the same FlattenFormField routine, but the results look good with much less overhead than relying on Acrobat Reader.

Upvotes: 1

EagleOfToledo
EagleOfToledo

Reputation: 564

We use the Adobe Reader plug-in and face this issue often. It particularly surfaces after a user performs a web-update on the Adobe Reader.

Try un-installing (via the Control Panel), then re-installing the latest Adobe Reader.

That invariably clears the issue for our users.

Upvotes: 0

Jeroen Wiert Pluimers
Jeroen Wiert Pluimers

Reputation: 24523

The Acrobat ActiveX/COM object is notorious for not supporting interfaces of older versions properly. You get EOleSysErrors all over the place.

What I have personally done for a couple of clients, is load the PDF documents in a TWebBrowser.

TWebBrowser is a wrapper around the ActiveX/COM component that Internet explorer uses to display everything.

Adobe is pretty good in making that work with each Acrobat update, so the TWebBrowser then also works.

Note that this only makes sense for displaying the PDF document.

--jeroen

Upvotes: 0

Lars D
Lars D

Reputation: 8573

Put the component on a TForm, then it probably works.

Upvotes: 0

Related Questions