Try this script, which is part of CAM::PDF.
In reply to Re^2: PDF decoding in Perl by Phenomanan in thread PDF decoding in Perl by Arik123