Need to quickly count pages in a PDF — or hundreds of PDFs? Here are 5 free methods including ZiaSign's instant page counter.
You'd think counting pages in a PDF would be trivial — and for a single file, it is. Open it, check the page indicator, done.
But when you need to:
...then you need better methods. This guide covers every approach — from the simplest online tool to developer-grade solutions.
Fastest method: Drop your PDF(s) on ZiaSign's Page Count tool — instant results, free, no account required.
Best for: Quick page counts, mobile, bulk files
Features:
This is the fastest method for most users. No installation, no command line, just drag and drop.
Best for: Users who already have Acrobat installed
Limitations:
Best for: Developers, power users, scripting
pdfinfo (poppler-utils)# Install (macOS)
brew install poppler
# Single file
pdfinfo document.pdf | grep "Pages"
# Output: Pages: 42
# Bulk count — all PDFs in a folder
for f in *.pdf; do
pages=$(pdfinfo "$f" 2>/dev/null | grep "Pages" | awk '{print $2}')
echo "$f: $pages pages"
done
# Total page count across all PDFs
for f in *.pdf; do pdfinfo "$f" 2>/dev/null | grep "Pages" | awk '{print $2}'; done | paste -sd+ | bcqpdfbrew install qpdf
qpdf --show-npages document.pdf
# Output: 42exiftoolbrew install exiftool
exiftool -PageCount document.pdf
# Output: Page Count: 42Advantages: Scriptable, fast, works in CI/CD pipelines Disadvantages: Requires installation, command-line comfort
Best for: Automation, integration into workflows, detailed analysis
from PyPDF2 import PdfReader
import os
def count_pages(filepath):
"""Count pages in a single PDF file."""
reader = PdfReader(filepath)
return len(reader.pages)
def count_all_pdfs(folder):
"""Count pages in all PDFs in a folder."""
results = {}
total = 0
for filename in sorted(os.listdir(folder)):
if filename.lower().endswith('.pdf'):
filepath = os.path.join(folder, filename)
pages = count_pages(filepath)
results[filename] = pages
total += pages
return results, total
# Usage
results, total = count_all_pdfs('./contracts/')
for name, pages in results.items():
print(f"{name}: {pages} pages")
print(f"\nTotal: {total} pages across {len(results)} files")Install the dependency:
pip install PyPDF2Pro tip: Combine with pandas for CSV output, or openpyxl to generate Excel reports of page counts across your document library.
Best for: Windows administrators, batch processing
# Requires iTextSharp or similar library
# Simpler approach using Shell.Application COM object:
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace("C:\Contracts")
foreach ($item in $folder.Items()) {
if ($item.Name -like "*.pdf") {
$pages = $folder.GetDetailsOf($item, 156)
Write-Host "$($item.Name): $pages pages"
}
}Note: The property index (156) for page count may vary by Windows version.
Print vendors charge per page. Knowing exact page counts across your document set helps you:
Law firms and legal departments track document volume by pages:
Document shipping costs depend on volume:
Content and publishing projects use page counts for:
Page counts feed into storage and archival planning:
Choosing an e-signature platform is a decision that affects every contract, every deal, and every hire. This comparison evaluates ZiaSign against DocuSign and PandaDoc across pricing, features, ease of use, security, and support — with completely transparent analysis, including areas where competitors currently have an advantage.
Sejda is a popular PDF to Excel converter, but its free tier restricts you to 3 tasks per hour, 50 MB files, and 200 pages. This comparison shows how ZiaSign's free PDF to Excel converter delivers better table extraction accuracy with AI-powered detection, no hourly limits, and support for complex multi-table documents — completely free.
Frustrated with Smallpdf's free tier limitations? Daily file limits, watermarks on output, the constant push to upgrade? This guide compares Smallpdf with ZiaSign's free PDF toolkit — 119 tools covering everything from basic merge/split to AI-powered document intelligence. No daily limits, no watermarks, no account required.