use CAM::PDF; my $self = CAM::PDF::->new('test.pdf'); for (1..$self->{'PageCount'} )#total no of pages { $pages = $self->getPageText($_) ; push (@text, $pages);#push the extracted text into an array }