Re: reading a PDF's title

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I worked it out. I actually vi several acrobat file
to see the actual code inside.
This is my script after my study.

This is certainly not the best method, but
it works for me. Somebody may be interested
it using or improve this. Please tell me if you
guys got a better method:

<?php

$string = file_get_contents($filename);
$start = strpos($string, "<dc:title>") + 10;
$length = strpos(substr($string, $start), '</dc:title>');
if ($length) {
   $title = strip_tags(substr($string, $start, $length));
}

?>

Cheers,
Koala

On 9/8/06, Shu Hung (Koala) <koalay@xxxxxxxxx> wrote:

Hello,

I know PDF files stores a "Title" somewhere.
I'm not sure if it is at meta data or elsewhere.

Does anyone have any method to get this "Title" out?

Thanks
Koala Yeung


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux