Original Source Link
I unsuccessfully used the “pages” feature in Windows Explorer, as well as in Directory Opus 10 and Free Commander XT (which I installed just for that reason, to try it out) to display the page count of multiple PDFs in a folder.
All my PDF’s are free to edit, i.e. not write-protected. I don’t understand why any PDF reader can display the (correct) page number, but none of the file explorers can? (In the “details” view of course.)
The only documents whose page count is displayed are MS Word documents.
As you know for such information a Shell Extension Handler for PDF should be installed, but is there any?
On a side-note: Did that change in Windows 8?
Initial research: Google search was unsuccessful, the only slightly related SE topic I found was “How to count pages in multiple PDF files?“.
For non-natively supported file types the Windows Shell needs shell extension handlers (sort of a plugin) to extend some of the Shell functionality to these file types.
Under Windows XP or earlier, the Shell uses the called Column Handler extension to show files metadata in the Windows Explorer details view columns.
Since Vista, the Shell uses the more versatile Property (or Metadata) Handler. This extension is also used to show and edit the files metadata on the Windows Explorer details pane and file properties details tab, and to show metadata on many other file dialogs (file delete confirmation, etc.).
It’s also required to have these files metadata indexed by the Windows Search indexer. The indexer may also use a IFilter extension to index the files text content.
The PDF file type is not natively supported by the Windows Shell (this has not changed in Windows 8.x, nor Windows 10), so you will need to install a PDF Property Handler in order to access the PDFs metadata.
I develop a commercial tool, the PDF-ShellTools, that provides the Windows Shell with a PDF Property Handler.
You can sort, filter pdf files based on title, pages etc using this shell extenion Debenu
Additionally, this portable application extracts all data from pdf files and produces a tabluar output which you can use in your workflow pdfinfogui
The free utility PDF Property Extension! by CoolSoft provides those columns, and also shows the information in the file properties dialog.
This utility appears to be quite updated as required, and supports e.g. Windows 10.
I know you’re asking about viewing pdf page count in windows explorer, but if what you’re looking for is a list of pdfs with the page number of each, Acrobat Pro does that.
1. Under the File menu select “Organizer.”
2. Go to the folder with the pdfs you’re interested in.
3. In the “Sort by” field, select “Number of Pages.”
That will display the number of pages for each pdf file. Not exactly what you want. But should do the trick.
Everyone wants to use a tool, get the page count and then export it to Excel. Why not use Excel to do the page counting and then put it in a sheet?
Look at http://www.mrexcel.com/forum/excel-questions/347911-visual-basic-applications-page-count.html
This is the code and it works fantastic:
Dim MyPath As String, MyFile As String
Dim i As Long
MyPath = "C:TestFolder"
MyFile = Dir(MyPath & Application.PathSeparator & "*.pdf", vbDirectory)
Range("A1") = "File Name": Range("B1") = "Pages"
Range("A1:B1").Font.Bold = True
i = 1
Do While MyFile <> ""
i = i + 1
Cells(i, 1) = MyFile
Cells(i, 2) = GetPageNum(MyPath & Application.PathSeparator & MyFile)
MyFile = Dir
MsgBox "Total of " & i - 1 & " PDF files have been found" & vbCrLf _
& " File names and corresponding count of pages have been written on " _
& ActiveSheet.Name, vbInformation, "Report..."
Function GetPageNum(PDF_File As String)
Dim FileNum As Long
Dim strRetVal As String
Set RegExp = CreateObject("VBscript.RegExp")
RegExp.Global = True
RegExp.Pattern = "/Types*/Page[^s]"
FileNum = FreeFile
Open PDF_File For Binary As #FileNum
strRetVal = Space(LOF(FileNum))
Get #FileNum, , strRetVal
GetPageNum = RegExp.Execute(strRetVal).Count
I have been able to achieve the desired result with Tracker Software’s PDF-XChange Viewer. It’s a Freeware PDF viewer with some extras, including a Shell Extension and iFilter.
To register the shell extension you have to:
- Install the viewer
- Set it as default program for PDFs (this activates the shell extension)
- Reset your default for opening PDFs to the previous value (the program even has an option for it) Optional
I can see (and sort by) the PDF page count of PDF files in Windows 10 Explorer, when the “pages” column is activated. Not sure if this feature is provided by PDF-XChange Editor which I have installed.