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

Re: PERL/PDF Need Help



There are at least two ways that I can think of:

1. Use the PDF module from CPAN: http://search.cpan.org/~antro/PDF-111/PDF.pm
2. Ask file to tell you: system("file $filename | grep PDF")

Peter

Gowtham wrote:

Fellas,

I am working on a small, pet project that requires me to upload a PDF document to the webserver. I know how to upload
any document and have documented it here:

 http://sgowtham.net/blog/2008/07/24/file-uploads-via-perl-and-cgi/

I know how to do it in PHP/MySQL but the server does not
have PHP on it (it's a golden oldie). Can any of you please
help me learn how do I make sure the uploaded document is
actually a PDF and not something funky?

Thanks for your time.

Regards,
g

--
Gowtham
http://phy.mtu.edu/~sgowtham/