Solved

Get Title from PDF with ASP/VB Script

Posted on 2004-03-30
3
826 Views
Last Modified: 2009-06-04
Hi Experts,

I need to get the title from a pdf (not the filename!) with ASP or VB Script... Does anyone knows a solution for that problem?

Greets & Thanks,
Andy
0
Comment
Question by:Snody
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
deighc earned 500 total points
ID: 10713353
PDF is a proprietary document format and it has it's own document object model so I think it's safe to assume that you'll have to use a 3rd-party component to do this. There's no way to do this directly with script.

I've used ActivePDF Toolkit many times and it lets you access the title of document thru the .title property (along with lots of other info about the document):

<%

set pdfToolkit= Server.CreateObject("APToolkit.Object")

if pdfToolkit.GetPDFInfo("<full path to pdf document>") = 0 then
   Response.Write "Author : " & pdfToolkit.Author & "<br>"
   Response.Write "Subject : " & pdfToolkit.Subject & "<br>"
   Response.Write "Keywords : " & pdfToolkit.Keywords & "<br>"
   Response.Write "Creator : " & pdfToolkit.Creator & "<br>"
   Response.Write "Producer : " & pdfToolkit.Producer & "<br>"
   Response.Write "CreateDate : " & pdfToolkit.CreateDate & "<br>"
   Response.Write "ModDate : " & pdfToolkit.ModDate & "<br>"
   Response.Write "CustomDocInfo : " & pdfToolkit.CustomDocInfo & "<br>"
   pdfToolkit.CloseInputFile
else
  ' Couldn't find PDF file
end if

set pdfToolkit= nothing
%>
0
 

Author Comment

by:Snody
ID: 10713507
Is there no free software which can do this? ActivePDF Toolkit looks great, but it's damn expensive...

Thanks anyway,
Andy
0
 
LVL 15

Expert Comment

by:deighc
ID: 10713559
> ActivePDF Toolkit looks great, but it's damn expensive

True. But at the risk of sounding like I work for them there stuff is very good. Very fast, well documented and easy to use.

There are many other PDF components that you can use in an ASP page. Some are cheaper than others but I doubt you'll find a free one because any software that modifies or generates PDF's has to pay a royalty to Adobe.

Try this search on Google:

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=ASP+pdf+component
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 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

15 Experts available now in Live!

Get 1:1 Help Now