Other PDF Issues

Extract or Print PDF Pages by Keyword or Comment in Acrobat

Adam DavisAdam Davis Nov 19, 2026 868 views

Question details

The user wants to extract or print PDF pages that contain specified keywords or comment text.

Extract or Print PDF Pages by Keyword or Comment in Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Select matching pages from a large PDF, potentially around 500 pages, for extraction or printing.
Observed behavior
Acrobat does not have a built-in feature that automatically selects pages using keyword or comment rules, and custom scripts may perform poorly on large files.
Before you start

Decide whether matches should include page text, comment text, or both, and identify the exact terms to search for. If the PDF contains scanned images, make its text searchable with OCR before searching page content.

Solution 1Recommended

Extract matching pages with a Python PDF tool

Use a separate automation tool when manually reviewing a large PDF would be impractical.

The example below uses PyMuPDF to find a keyword in page text or a phrase in comment content, then creates a PDF containing the matching pages. It does not automatically print the result.

Test the rules on a smaller document first. Results depend on searchable page text and the way comments are stored in the PDF.

1
Install PyMuPDF

Install Python, open a terminal, and run: python -m pip install pymupdf

2
Create the extraction script

Save the following code as extract_matches.py. Replace input.pdf, budget, and review needed with your file name and search terms: import pymupdf source = pymupdf.open('input.pdf') result = pymupdf.open() for i, page in enumerate(source): text_match = bool(page.search_for('budget')) comment_match = any( 'review needed' in (annot.info.get('content') or '').lower() for annot in (page.annots() or []) ) if text_match or comment_match: result.insert_pdf(source, from_page=i, to_page=i) if len(result): result.save('matching-pages.pdf') print('Saved matching-pages.pdf') else: print('No matching pages found') result.close() source.close()

3
Run and review the output

In the terminal, run python extract_matches.py. Open matching-pages.pdf in Acrobat and check that the expected pages were included.

4
Print the matching pages

In Acrobat, open matching-pages.pdf, choose File > Print, and review the print settings before selecting Print.

Extract matching pages with a Python PDF tool
Adjust the selection rules: The sample includes a page if either condition matches. To require both, change 'text_match or comment_match' to 'text_match and comment_match'. More complex comment rules may require a custom script.
Free Microsoft Office alternative

Review and Print PDF Pages with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. You can review and print selected PDF pages, although it does not automatically select pages by keyword or comment rules.

Review a PDF and print selected pages manuallyOpen Microsoft Office formats including DOCX, XLSX, and PPTXUse a familiar interface to move between PDFs and Office documentsGet started with a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Can Acrobat automatically extract pages containing a specific comment?

Acrobat does not provide a built-in rule for this. A custom Acrobat JavaScript action may be able to search comments and extract pages, but a dedicated automation tool may be more suitable for a large document.

Can I search both PDF text and comments?

Use Acrobat's Find feature to locate page text and the Comments panel to review comment text. Record the matching page numbers if you plan to print or extract them manually.

Why might a keyword search miss text in a scanned PDF?

A scanned page may contain only an image rather than searchable text. Run OCR in Acrobat first, then repeat the search.

How do I print only the extracted pages?

Open the extracted PDF in Acrobat, choose File > Print, check the printer and page settings, and select Print.