Acrobat DLL issue

I am trying to use the Adobe Acrobat Reader 7.0 Dll AcroRd32.dll in my ASP application to dynamically render PDF files. I can easily add the reference. I can use the reference in my code. Intellesense shows no errors. I have no problems before build. When I try to run the page, I get the following error:

Server Error in '/' Application.

Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed with HRESULT: 0x80040154(Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed with HRESULT: 0x80040154(Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))).

Source Error:

Line 54:     <%
Line 55:    
Line 56:         Dim cPDF As New Acrobat.AcroPDDoc
Line 57:         Dim co As Boolean = cPDF.Open("C:\Shared\Test.pdf")
Line 58:         If co Then

Source File: c:\Shared\Website\zhigza\Search.aspx    Line: 56

Stack Trace:

[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed with HRESULT: 0x80040154(Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))).]
   ASP.Search_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Shared\Website\zhigza\Search.aspx:56
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2044699
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +119
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7780


Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44

Can anyone help me?
Who is Participating?
softplusConnect With a Mentor Commented:
Hmm. To convert PDF or PS to images you'll need to render everything, i.e. not something very easily done :). I checked xPdf, however the tools available for windows don't seem to be of much use - the other ones are only available for linux/unix versions (so not much help there). The c++ wrapper you are referring to - is it for windows? If so, it "should" be possible to wrap it in a dll and use this from your application. However, that will likely be lots of work....

If you are doing this for yourself (i.e. private) or for a non-profit organisation, you might be able to "beg" a free version of one of those payware-tools - many companies allow you to do that, providing you don't bug them much with support, etc. (unofficially, however :)).

Hmmmm.. Looking through ghostscript - I think it just might do what you want :) - you'll need to shell to it though. You might want to check these links for more ideas:
(skip the printer driver :)),7653.0.html
(EPS = more or less PDF)
(ImageMagik uses ghostscript)
(ghostscript with asp)
Give it a try :)
Could it be that you don't have the dll registered on the server? COM-Objects need to be registered before you can use them. If this isn't "your" server (i.e. hosted somewhere), you will need the administrator to do this for you. Also, if the acrobat.acropddoc object needs further obejects/files, these need to be available (and registered if needed) before you can use them. Probably, you will need to have the provider buy and install Acrobat on the server and maybe he won't be able to do this for licensing reasons (I don't know, maybe Adobe restricts the server-side usage?).

You could bypass this by using some other PDF-Generator-Objects, there are some out for .NET specifically, you might try these (see for example
bastawhizAuthor Commented:
This is on my personal server. I have the DLL registered.... I have tried that many times. I have Acrobat Reader installed.

I am not using the DLL to generate PDFs.... in fact, I am doing quite the opposite. I am using this to read the file and create a rendering of the contents, then scale it down and export it as a thumbnail. I know that QuarkXPress does this, but I don't want to spend any money on this and I have no idea about consuming any QuarkXPress APIs.

I will look at that site and see if there is anything that will suit my needs.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Have you tried to access the dll outside of the ASP.NET context, i.e. through a program directly? (possibly a permissions problem?)
bastawhizAuthor Commented:
I have tried that, softplus, and it failed there with almost exact error messages.

In order to skip this problem entirely, is there some way in which I can use another PDF rendering engine?

I am doing some experimenting with Ghostscript, but that seems to be too difficult and slow to use in a production environment where many files are being processed at a time.

I have also looked at XPdf, as well as a few alternatives that may also work. Generally, my main goal is just to convert a PDF to text, graphics, or other misc. formats. Is there anything I can use for this?
Did you see this: 
or this:
They are both payware components, but possibly what you were looking for :).
bastawhizAuthor Commented:
I had seen the first, but again, both cost money, something I don't have.

I had looked around at GS, and found a VB.Net wrapper. However, it was only PS to PDF. Is there a way to convert PDF to (insert image format here)? I know there is a way to do it with the C++ wrapper, but C++ is the devil's tongue. Is there a way to do any of this in VB?

Also, XPdf provides some nifty apps. For example, PDF->Text, PDF->Images, etc. Is there a way to expose this as an API?

Remember, I need to do all of this from ASP.Net, so it doesn't matter much either way how it does it, as long as it works and is decently fast.
bastawhizAuthor Commented:
I'm thinking that ImageMagik will work. Does it have some sort of API that will do the work right from code rather than command line? I use VB.Net for code, so anything in that language will be greatly appreciated
bastawhizAuthor Commented:
I've started using ImageMagick. However, the documentation provides little information on using the API/OLE Object. Can you provide me with a bit of documentation, tutorial, sample, or other piece of information that can allow me to complete a standard conversion?
bastawhizAuthor Commented:
I have just found some resources on my own. Thank you for your assistance.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.