@INC=('C:/Perl/lib','C:/Perl/site/lib','.'); # THIS LINE IS ADDED use strict; use warnings; use CAM::PDF; my $pdf = CAM::PDF->new("test.pdf"); # test.pdf is the existing pdf my $string = $pdf->getPageText(1); open (C, ">", "test.txt"); print C $string; # print extracted string