[Lazarus] Get the number of pages in a pdf file

xlazarus at code4sale.com xlazarus at code4sale.com
Mon Jun 17 04:01:12 CEST 2019


Searching for strings of /Pages and /Count would be highly unreliable.

At worst, you would need to search the whole file, adding the entries.

To do it right, you need to get the page tree of the document catalog, then
recursively look up the kids of each page tree node, increment the count, then visit the all child nodes.

There are many libraries that can do this, both free, and commercial.

Joe C. Hecht
UberPDF.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190616/2e8f86e1/attachment.html>


More information about the lazarus mailing list