This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Finding the number of pages of a pdf file

Former Member
Former Member
Is it possible to use the API to find the amount of pages a pdf file has? (I know how to loop through all files and figure out which ones of those are pdf files.) At least a quick search through the API documentation didn't show anything promising.

  • Former Member
    Former Member
    I'm using xpdfreader.com toolkit for little pdf-challenges. They are simple exe's and you can call them from commandline or script.
    One of the tools (pdfinfo.exe) is returning general info, including the number of pages. Grabbing that with script should be very doable.
    You'd have to download/save the pdf to disk by M-Files script, perform the command and grab the page# to add it as a property value.