in reply to Count the number of images in pdf

UPDATE:As marto points out, the OP's question was the number of images in a PDF file, not the number of pages. Thus the below is not the answer asked for.

I have never used it, but quickly browsing the documentation you linked in your post I found that you can use the 'pages' function:

$pagenumber = $pdf->pages

    Returns the number of pages in the document.

For Example:

use PDF::API2; my $pdf = PDF::API2->open('test_file.pdf'); print "'test_file.pdf' has " . $pdf->pages . " pages\n";

Replies are listed 'Best First'.
Re^2: Count the number of images in pdf
by marto (Cardinal) on Dec 21, 2005 at 12:48 UTC
      Wow!, My bad... I hadn't had my first cup of coffee yet, and I must have read the word 'images' as 'pages'.

      Sorry for the confusion anniyan

      marto thanks thats wonderful. Just now i tested using listimages.pl and accomplished my job perfectly. Also thanks to etm117.

      Regards,
      Anniyan
      (CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)