Find and Delete Duplicate Pages in a Large PDF
Question details
The user needs an efficient way to identify and remove duplicate pages from a 5,000-page PDF.

- Product
- Adobe Acrobat and PDF
- Device & OS
- not provided
- Scenario
- A large PDF may contain duplicate pages that would take too long to compare manually.
- Observed behavior
- The user wants to find potential duplicates automatically and remove confirmed copies.
Check that you can open the PDF without a password and have Python installed. Keep the original file unchanged while you review the matches and create a separate output file.
Compare rendered PDF pages and remove confirmed duplicates
Use a Python script to find visually identical page renders, then delete only the page numbers you have reviewed.
Acrobat does not have a built-in tool that automatically detects duplicate pages. This method compares rendered page images at 144 DPI; identical renders do not guarantee that links, form fields, hidden content, or other PDF data are identical.
The comparison processes one page at a time, but rendering 5,000 pages can still take considerable time. It identifies exact matches at the chosen rendering settings, not near-duplicates.
Open a terminal or command prompt and run: python -m pip install pymupdf
Save the following as find_duplicates.py in the same folder as your PDF, and replace input.pdf with your file name: import hashlib import fitz doc = fitz.open('input.pdf') seen = {} for index, page in enumerate(doc): pix = page.get_pixmap(dpi=144, colorspace=fitz.csRGB, alpha=False) digest = hashlib.sha256(f'{pix.width}x{pix.height}:'.encode() + pix.samples).hexdigest() if digest in seen: print(f'Page {index + 1} matches page {seen[digest]}') else: seen[digest] = index + 1 doc.close()
Run python find_duplicates.py in the terminal. Open each reported pair in your PDF viewer and check its content, links, annotations, and form fields before deciding which page to remove.
Create a plain-text file named remove.txt in the same folder. Enter each confirmed page number on a separate line, using the original PDF's one-based page numbers.
Save this script as remove_pages.py, replace input.pdf with your file name, and run python remove_pages.py: import fitz doc = fitz.open('input.pdf') with open('remove.txt', encoding='utf-8') as f: pages = sorted({int(line.strip()) for line in f if line.strip()}, reverse=True) if any(p < 1 or p > len(doc) for p in pages): raise ValueError('A page number is outside the PDF') if len(pages) >= len(doc): raise ValueError('At least one page must remain') for page_number in pages: doc.delete_page(page_number - 1) doc.save('cleaned.pdf', garbage=4, deflate=True) doc.close()

Delete reviewed pages in Adobe Acrobat
Use Acrobat when the comparison produces a manageable number of confirmed duplicates.
Review and organize PDFs with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office files. You can use its PDF tools to review and organize pages after identifying duplicates; it does not automatically detect duplicate pages.

Frequently Asked Questions
Can Adobe Acrobat automatically find duplicate PDF pages?
Acrobat does not include a built-in duplicate-page detector. You can use a custom comparison script or an Acrobat plug-in to identify candidates before deleting them.
Does a visual match mean two PDF pages are completely identical?
No. Rendered images can match even when links, form fields, hidden content, or other PDF data differ. Review the original pages before removal.
Will the script find pages that are almost identical?
No. The script reports exact matches between rendered images at 144 DPI. Near-duplicates require a comparison method with a carefully chosen difference threshold and manual review.
Why should I delete pages in descending order?
Deleting a page changes the numbers of pages after it. Removing the highest original page numbers first keeps the remaining numbers aligned with your reviewed list.
Can WPS Office automatically detect duplicate PDF pages?
WPS Office can help you review and organize PDF pages, but it does not automatically detect duplicates. Use a separate comparison tool to identify candidates first.




