Loading ...
Sorry, an error occurred while loading the content.

Re: PDF page count

Expand Messages
  • a_z0_9_blah
    ... other way to do this in PC version. ... Hi Anil You will need to go to http://www.foolabs.com/xpdf/ to download xpdf, (look for the Windows version in the
    Message 1 of 4 , Oct 4, 2007
    • 0 Attachment
      --- In perl-beginner@yahoogroups.com, selva kumar <templateteam@...>
      wrote:
      >
      > Hi Hernán,
      >
      > I am using PC version. I think this is UniX command. Is there any
      other way to do this in PC version.
      >
      > Regards
      > Anil


      Hi Anil

      You will need to go to http://www.foolabs.com/xpdf/ to download
      xpdf, (look for the Windows version in the downloads section). You
      are correct in saying his is a Unix solution. You'll need to read
      the documention to see how to call it from Windows.

      Below is a link to: How to pull Text from a PDF using Perl?
      (from perl beginners) David Wagner gave an example using Windows.
      However, I believe you'll want to use the pdftops command as Hernán
      has said, just without some of the Unix syntax at the end somehow.

      (the link below is all 1 line so you'll have to 'reconstruct' it
      into 1 line in a text editor then paste it into your browser's
      address bar)

      http://groups.google.com/group/perl.beginners/browse_frm/thread/33e83
      52da6aaaa4/f507e3ce60ede578?
      hl=en&lnk=gst&q=How+to+pull+Text+from+a+PDF+using+Perl&rnum=1#f507e3c
      e60ede578


      Hope this helps,

      Chris




      >
      >
      > Hi! i had the same problem and I solve that by using pdftops. May
      be there
      > is a simpler and elegant way, but it works fine:
      >
      > $pages = `pdftops $homedir/$file - 2>> pages.err | grep -c "%%
      Page:"`;
      > chomp($pages) ;
      > $pages *= 1.;
      > print "$pages\n";
      > Cheers!
      >
      > Hernán
      >
      > On 9/29/07, selva kumar <templateteam@ yahoo.com> wrote:
      > >
      > > Hello All,
      > >
      > > I want to count the total number of PDF pages in the files. I
      have tried
      > > thru PDF modules Parse, API2, Extract. but it fails to read all
      PDF files.
      > >
      > > Can anybody please let me know which module i can use to count
      the total
      > > number of pages.
      > >
      > > Thanks in
      > Advance
      > > Anil
    Your message has been successfully submitted and would be delivered to recipients shortly.