use CAM::PDF; my $pdf = CAM::PDF->new('test2.pdf'); my $num_page=$pdf->numPages(); print "Total Pages : $num_page\n"; my ($x,$y,$width,$height)=$pdf->getPageDimensions(2); print "Dimension of PDF File : $width x $height px \n";