Re: pdf properties

From: Date: Thu, 10 Feb 2005 20:24:10 +0000
Subject: Re: pdf properties
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208479@lists.php.net to get a copy of this message
> Is there anyway to retrieve the properties from a pdf file using php? > > When you right click on a pdf file in windows you can see the title of > the file and you can change this property there also. > > I wrote a php page that lists all files in a certain directory. I want > to be able show the actual title of the document instead of just the > file name. > > I have searched the manual and google, everything that comes up refers > to generating pdfs on the fly, not working with an already made pdf. Take a PDF where you know the title. Then do this: <?php echo "<PRE>", implode("", file("/path/to/your.pdf")), "</PRE>;?> Now search for that title in your browser (control-F). Figure out what PDF markers (like HTML tags, only not) are surrounding the title. Write PHP code to find those tags and extract the title from between them. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#208479) next »