Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ASP.NET - Creating an AcroExch.PDDOC object returns an Active X error

Posted on 2004-08-11
Medium Priority
Last Modified: 2008-01-09
Hi folks -

I'm a pretty basic ASP.NET programmer and use a text editor to create applications, not Visual Studio.NET.

I'm trying to create an AcroExch.PDDOC object and am getting the "Cannot Create ActiveX Component" error.

I've got Acrobat 5.0 installed, as well as the 5.0 SDK. I used "Tblimp.exe" to create "Acrobat.dll" from the "Acrobat.tlb" in the SDK. I moved the "Acrobat.dll" to the "bin" directory of the ASP.NET application.

Code reads:

<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="ACROBAT" %>
<%@ Assembly Name="ACROBAT" %>
<%@ Page Language="VB" Debug="true" %>
Dim pdfDoc As Object
pdfDoc = CreateObject("AcroExch.PDDoc")

Any advice is much appreciated!

Mike Knapp

Question by:mrknapp
  • 4
  • 2
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11779219
ASP implies a web setup: Acrobat is not licensed (and not technically feasible) for server use. You have to switch to a 3rd party tool if you want to do PDF processing on a web server.

What do you want to do with the PDF file? I may be able to give you some pointers about possible 3rd party products.

Author Comment

ID: 11779410
Thanks for the feedback.

I'm looking for two pieces of information from the PDF file: the number of pages in the document & an extraction of an executive summary in the report. We have 1700+ reports.

That's about it.

I suppose the ultimate might be to have that information stored in an XML document, but I'd  be happy with anything.

LVL 44

Accepted Solution

Karl Heinz Kremer earned 2000 total points
ID: 11779467
Getting the number of pages is simple. You can do this with pretty much any tool. There are standalone tools (e.g. one comes with XPdf - http://www.foolabs.com/xpdf/). Another option is to use something like iText.NET (http://www.ujihara.jp/iTextdotNET/en/)

Extracting the executive summary may be impossible: Extracting text is one of the most complicated things you can do with PDFs. The XPdf tools can also extract text from a PDF. It's up to you to identify what part is the executive summary. There is very likely nothing in the PDF that would identify the text section as "executive summary".
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11779472
BTW: Acrobat would also not help you with the second part, so you are not missing out on any features that you would have access to only with Acrobat.
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 11779486
Thanks. This was easy :-)
I noticed that this was your first question on EE. Let me welcome you to the site. I hope you get the response you've expected from this site.

Have fun, and thanks again for the quick turnaround.

Author Comment

ID: 11779488
Great, thanks for the information.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the questions I get asked again and again is how to validate a field value in an AcroForm with a custom validation script. Adobe provided a lot of infrastructure to do that with just a simple script. Let’s take a look at how to do that wit…
This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question