Solved

Need a script to read pdf document info.

Posted on 2001-07-31
7
941 Views
Last Modified: 2008-02-01
I currently have a folder on my Intranet server (IIS 4)containing many pdf files. Can anyone provide me with a "property reader" for pdf similar to the DSOLEFILE.DLL provided by Microsoft for use with MS Office documents.

http://msdn.microsoft.com/library/periodic/period00/fso.htm

Used in conjunction with the FileSystemObject you can trawl through folders, read each document's properties and generate html and hyperlinks on the fly.

Basically I want dumb users to drop their pdf's into a folder on the server, and have an asp or similar to read each file's properties and display Author, Subject and Title (with hyperlink). I've looked at adobe.com but can't find anything suitable.
0
Comment
Question by:devlinb
7 Comments
 
LVL 19

Expert Comment

by:webwoman
ID: 6338061
You're not going to find anything on Adobe's site, because this has nothing to do with PDF -- and everything to do with the SERVER.

YOu need to set up a form for the user to upload their files. You won't have a whole lot of control over what or how they upload, though you certainly could write something that ran on the server and deleted anything that didn't meet your specs (for filetype/size).

That dll is specifically designed to work with IIS -- it's not going to work with Apache, or on a UNIX box. It works with MS stuff because MS wrote it.
0
 
LVL 5

Expert Comment

by:raizon
ID: 6338075
I believe the point of the question was finding some way to read the properties of the PDF files dynamically to display the Author, Subject and Title of the file.

What I would do is

1.  In my upload form I would have text fields for the
Author, Subject and Title of the PDF.

2.  Create a DB with a table to hold that information and relate that table to anotherone that held the path to the file that was uploaded.

3.  When reading through the directory with the FileSystemObject query the DB to get the Information and build your page based off of that.

Raizon
0
 
LVL 1

Accepted Solution

by:
coreyti earned 100 total points
ID: 6338141
There is a Perl module that can take care of this stuff if you're able to use Perl for your project.

Checkout the PDF::Parse library at:
http://search.cpan.org/doc/ANTRO/PDF-111/PDF/Parse.pm

-corey
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 2

Author Comment

by:devlinb
ID: 6355247
thanks coreyti,
This script works fine - except for PDF's which have any security built-in. When security is added to a PDF the document info is encrypted in some way and displays as garbage. Is there any way to get around this?
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6357211
Unlikely. It's got security because it's not supposed to be accessible.
0
 
LVL 2

Author Comment

by:devlinb
ID: 6358728
I disagree - the document information is still accessible in the reader even after a pdf has been secured. Why would Adobe want to make this inaccessible when all you want to do is prevent a pdf document from being modified?
0
 
LVL 2

Author Comment

by:devlinb
ID: 6368770
When security is added to a PDF, the document info is encrypted in some way and displays as garbage. Is there any way to get around
this?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

861 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now