Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-11
6
Medium Priority
?
1,049 Views
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

0
Comment
Question by:mrknapp
  • 4
  • 2
6 Comments
 
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.
0
 

Author Comment

by:mrknapp
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.

0
 
LVL 44

Accepted Solution

by:
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".
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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.
0
 
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.
0
 

Author Comment

by:mrknapp
ID: 11779488
Great, thanks for the information.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Can Be Caused By Disabled Services I have encountered a problem viewing PDF files using Adobe Acrobat Reader.  For the longest time, PDFs might launch or might not.  Sometimes they took about 15 minutes to appear after launching them. After som…
*Adobe Acrobat 9 was used for this article.  Particular steps may vary depending on software versions. Adobe Acrobat has many, many variables that my be utilized to customize your forms for clarity and ease of use. The Form Editing Tool will be y…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
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…

971 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