Re: how to get page count when uploading files

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

 



On Sat, September 16, 2006 9:44 am, Jian Fu wrote:
> 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?

If you actually mean "page count" PHP itself doesn't know anything
about that.  To PHP, it's just "a file" full of "data"

The PDF PDI will probably solve the PDF question.

If it's true, as stated, that Word files are just RTF documents, and
you could use an RTF parser to read them, then it's entirely possible
that a PHP RTF parser exists "out there" if you Google for it...

You may also just mean "file size" http://php.net/filesize

"Page Count" in Word might also change based on printer settings -- I
don't think you'll get the same number with US versus A4, for example,
with most Word documents.  Throw in different print margins and other
fun things that can be done at the printer driver setup level, and
you've got a whole new can of worms.

The RTF parser may or may not allow you to specify, but if you *NEED*
that page count for something crucial, test thoroughly.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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