in reply to no responses for the execution of the code

Hi warmsuns, as you need to convert the pdf to text you can use the existing CPAN modules

PDF::API2

CAM::PDF

CAM::PDF::PageText

Untested code:

use strict; use warnings; use utf8; use CAM::PDF; use CAM::PDF::PageText; my $FileName = shift || die "Usage:Command line argument Missing. Give + a PDF file as argument\n"; my $Pdf_Obj = CAM::PDF->new($FileName); print text_from_page(1); sub Text_From_Page { my $pg_num = shift; return CAM::PDF::PageText->render($pdf->getPageContentTree($pg_num +)); }

Replies are listed 'Best First'.
Re^2: no responses for the execution of the code
by warmsuns (Initiate) on Feb 25, 2013 at 21:16 UTC

    Thank you so much .I didn't expect so many responses form the forum. it feels so good!I am a thesis student in computer science ,and my professor asked my to study the perl code some students did before the purpose of which is to get the semantic head from a paper.It takes time to read what other has already finished and I have so many questions just don't know where to go for help:) Thanks again for all of you !