RE: [PHP] how to get page count when uploading files

From: Date: Sun, 17 Sep 2006 04:39:25 +0000
Subject: RE: [PHP] how to get page count when uploading files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-241869@lists.php.net to get a copy of this message
Oh, btw, I use PHP ftp function to upload the file, but there is no information in $_FILES to tell me the total page for Word or PDF file. Really appreciated your time and help! Thank you very much! Jian -----Original Message----- From: Stefan van der Linden [mailto:stefan.vanderlinden@planet.nl] Sent: 2006年9月17日 2:49 To: jian.fu@gtwebsolutions.com Cc: php-general@lists.php.net Subject: Re: [PHP] how to get page count when uploading files >I really need help and after going through the help page, I don't know where >I can post my question. > > > >When I upload a file (word or pdf), how can I know the page counts of that >file immediately? > > > >Thank you, Jian There's no function in the PDF library to READ the file. And about Word documents (.doc): Word calculates the amount of pages at 'parsetime'. Word documents are just RTF files, and they don't describe the amount of pages in the files. So it's really tricky to make a script that counts the pages in Word documents, as you would have to make an RTF parser. :/

« previous php.general (#241869) next »