I'm looking to find the number of pages within a PDF file. I've tried 3 methods, found in various forums, which get stuck at some stage in the code. In all methods I'd like to open the PDF file as .txt and search for the string /pages. A couple characters/positions after this string contains the number of pages. See below:
Opening the PDF in binary code does not contain the same text/information as a .txt. Is there a way to use 'Open' function to a .txt file?
The next method was to open the file shell command. I can open the PDF as .txt however not aware of a method to activate that file and extract the data I
Finally I want to use the 'Name' function to rename the PDF .txt, open the new file and extract that way. However, in doing so I get an "invalid procedure" at the 'Name' function line.
Similarly I could copy or convert the pdf file to a .txt since I still want to maintain the original pdf file.
Am I on the right path with any of these?
Bookmarks