Page 1 of 1

PDF problems

Posted: 2008-04-06T07:32:22-07:00
by spider
Hi!
I need some help. In code c++ i need to ask number of pages in pdf-file, something like : system("identify -format %n some.pdf"); but without use 'system' if this possible? And how?
Thank you.

Re: PDF problems

Posted: 2008-04-06T07:40:56-07:00
by magick
Try this:
  • list<Image> imageList;
    readImages( &imageList, srcdir + "smile_anim.miff" );
    cout << "Total pages: " << imageList.size() << endl;
The the ping() method instead of readImages() if you only want the number of pages.

Re: PDF problems

Posted: 2008-04-06T07:58:07-07:00
by spider
Thank you!
It work, but unfortunately it work too slow... if you show me some sample code with using ping(), or something else? Please...
I need number of pages only....