How to Count Pages in Multiple PDFs with PDF Page Counter

Summary :

This article introduces 4 efficient PDF page counters along with their step-by-step guides, providing streamlined solutions for counting pages across multiple PDFs.

Table of Contents

PDF Page Counter

PDF Page Counter

In today’s work or life, almost every field relies heavily on the PDF format. Consequently, as the volume of information increases and work tasks multiply, you may find yourself dealing with many PDF files. In such situations, understanding the total number of pages in each file becomes crucial. To streamline this workflow, PDF page counters come into play.

In this article, I will introduce four tools and their corresponding usage methods to help you easily achieve the counting of page numbers in multiple PDF files.

Using a Free Online PDF Editor – PDFgear 

To kick things off, my top recommendation is PDFgear, a fully free PDF editor compatible with both Windows and Mac. With PDFgear, not only can you accurately count pages in PDF files, but you also have access to lots of editing features.

You can manipulate each page individually, catering to diverse requirements. Moreover, PDFgear supports seamless content addition from images or Word documents directly into PDF files, simplifying the entire counting process. Here’s a tutorial on how to count PDF pages using PDFgear:

Step 1. Merge Multiple PDF Files

If you need to determine the total number of pages in a large batch of PDF files, you can start by merging them into one. Click on Merge & Split > Merge PDF, then batch-add all the PDF files.

Combine PDF Files with PDFgear

Combine PDF Files with PDFgear

Click Add Files to select all files, then click Merge.

Merge PDF Files into One

Merge PDF Files into One

Step 2. Count PDF Pages

Once the merging process is complete, open the merged file using PDFgear. The total number of pages and the current page number will be displayed at the bottom.

Get PDF Page Count

Get PDF Page Count

But that’s not all—PDFgear also integrates an AI assistant, offering you even more powerful features. By using specific commands, you can let the AI assist you in quickly analyzing, translating and summarizing the content of PDF files, extracting key information, and rapidly understanding the document’s main topics and points.

Count PDF Pages Using Excel and VBA

If you’re looking to quickly count the page of numerous PDF files without the need for page modifications, I recommend using VBA. VBA stands for Visual Basic for Applications and is an event-driven programming language implemented by Microsoft for developing Office applications.

With just a few lines of code, you can automate the process of PDF page counting. The only prerequisite is having Microsoft Excel open. Here are the steps to use VBA in Excel to count the number of pages in multiple PDF files:

Step 1. Place all PDF files that need page counting into a single folder.

Step 2. Open a new worksheet in Excel, then press Alt+F11 to open the Visual Basic Editor.

Step 3. Click on the Insert option in the menu bar, then choose Module to insert a new VBA module.

Insert a VBA Module

Insert a VBA Module

Step 4. Paste the following VBA code into the newly inserted module. Press F5 to run the code and select the folder created in step one.
Sub Test()
Dim I As Long
Dim xRg As Range
Dim xStr As String
Dim xFd As FileDialog
Dim xFdItem As Variant
Dim xFileName As String
Dim xFileNum As Long
Dim RegExp As Object
Set xFd = Application.FileDialog(msoFileDialogFolderPicker)
If xFd.Show = -1 Then
xFdItem = xFd.SelectedItems(1) & Application.PathSeparator
xFileName = Dir(xFdItem & "*.pdf", vbDirectory)
Set xRg = Range("A1")
Range("A:B").ClearContents
Range("A1:B1").Font.Bold = True
xRg = "File Name"
xRg.Offset(0, 1) = "Pages"
I = 2
xStr = ""
Do While xFileName <> ""
Cells(I, 1) = xFileName
Set RegExp = CreateObject("VBscript.RegExp")
RegExp.Global = True
RegExp.Pattern = "/Type\s*/Page[^s]"
xFileNum = FreeFile
Open (xFdItem & xFileName) For Binary As #xFileNum
xStr = Space(LOF(xFileNum))
Get #xFileNum, , xStr
Close #xFileNum
Cells(I, 2) = RegExp.Execute(xStr).Count
I = I + 1
xFileName = Dir
Loop
Columns("A:B").AutoFit
End If
End Sub

Step 5. Once completed, the Excel sheet will automatically list the name of each PDF file along with its corresponding page count. You can view individual counts or calculate the total page count across all files.

Automatically Count PDF pages

Automatically Count PDF pages

Count PDF Pages with Adobe Acrobat Pro

Using Adobe Acrobat Pro to calculate PDF page count is also simple. As a well-known PDF editing software in the industry, Adobe Acrobat Pro offers more PDF editing features, such as modifying, annotating, signing, and more. You can complete multiple adjustments in one tool, thereby improving work efficiency.

Step 1. After installing Adobe Acrobat Pro, click on Tools > Combine Files. In the pop-up window, click the Add Files button, then select the PDF files you want to merge.

Combine PDF Flies with Adobe

Combine PDF Flies with Adobe

If you need to adjust the order of the PDF files, you can simply drag and drop them to rearrange them.

Reorder PDF Pages

Reorder PDF Pages

Step 2. Once the files are merged, open the combined file using Adobe, and you’ll see the total number of pages displayed at the top.

Check Total PDF Pages

Check Total PDF Pages

However, it’s worth noting that Adobe has a higher cost compared to entirely free tools like PDFgear. This might not be the most cost-effective option for everyone. Therefore, you may want to consider this aspect before deciding on Adobe as your PDF page counter.

PDFsam Basic – Count PDF Pages Easily

Another free software is PDFsam Basic. As a free and open-source software, you can enjoy all of its features and benefits.

Additionally, it supports usage on Windows, Mac, and Linux, addressing your potential need for switching between multiple operating systems. Here are the steps:

Step 1. Visit the PDFsam website and download the software. If prompted, register an account using your email address.

Step 2. Choose the Merge module from the main menu and add all files into it.

Merge Files with PDFsam

Merge Files with PDFsam

Step 3. You can view the merged PDF file and its corresponding page count now.

Obtain the Total Page Count

Obtain the Total Page Count

Conclusion

All in all, each of these 4 PDF page counters has its suitable scenarios, but considering everything, I am more inclined to recommend using PDFgear. Not only is it completely free and allows easy merging of files and viewing page numbers, but it also offers various modifications to PDF pages and text.

With AI integration, it can assist you in more advanced operations such as content analysis, translation, and data totaling, further boosting work efficiency. Therefore, using PDFgear will significantly simplify workflow and enhance productivity.

More Related Articles

arrowtop