
Highlight PDF
Highlight PDF is a REST API tool that adds highlight annotations to PDF text found by search criteria or identified through supplied selections. Search for text in the same request, or use findings from Search PDF or AI Search PDF to mark only the content your application has selected. Configure annotation color, opacity, author, subject, comment, and lock state to fit the review workflow.
Key Benefits of Highlight PDF API
- Find and highlight text in one request using exact text, custom regular expressions, or built-in pattern presets.
- Use selected findings from Search PDF or AI Search PDF when an application needs to review matches before marking them.
- Customize highlight color and opacity to distinguish review states, categories, or annotations in the resulting PDF.
- Add author, subject, and comment metadata to provide context for each highlight annotation.
- Apply highlights to selected pages when using search mode, or provide explicit selections for targeted annotation.
- Automate the creation of review copies through a REST API that fits into existing document workflows.
Start right from your browser - upload files, choose parameters, generate code, and send API Calls directly from API Lab!
You have document processing problems, we have Solutions. Explore the many ways pdfRest can align your documents with your business objectives.
Search and Highlight PDF Text in One Request
Send the search criteria to Highlight PDF to find text and annotate it in the same request. The right search method depends on what you want reviewers to notice:
- Exact text: Highlight a known term, product name, or phrase that appears throughout a PDF.
- Built-in presets: Mark common patterns such as email addresses or dates without defining your own matching rule.
- Custom regular expressions: Find organization-specific text, such as drawing references in the format
DWG-ME-0427, even when the discipline code or drawing number varies.
For example, an engineering team can mark drawing references in a review packet so readers can spot them as they read. Use a page range to limit the search to the equipment schedule when that’s the only section the team needs to review.
Highlight Selected PDF Search Results
When a review copy needs only some of the matches, use Search PDF or AI Search PDF to find the text first. Your application can then choose which findings become annotations.
- Find candidate passages. Use exact text or pattern matching when the wording is predictable. Use AI Search PDF to find passages by category or description.
- Choose what to mark. Keep the relevant findings in your application. A procurement team, for example, might select deadlines for the initial payment while leaving references to later installments unmarked.
- Create the review copy. Send the selected results with the same PDF you searched. Highlight PDF uses their locations to mark the passages in the output.
Reviewers get a copy with the relevant text already marked where it appears in the document.
Customize PDF Highlight Colors and Comments
Highlight annotations can convey what a passage means for a review while leaving the text readable. Set the annotation appearance and metadata to fit the way your team reads the finished PDF:
- Color and opacity: Distinguish types of findings with color and choose how prominently the highlights appear over the text.
- Author and subject: Identify the source of an annotation and label the kind of review it belongs to.
- Comments: Explain what the reviewer should look for or record why the passage was marked.
A quality team can use yellow for wording that needs approval and blue for text that needs clarification. For direct searches, submit each group in a separate request and use the first annotated output as input to the next request to keep both sets of highlights.
Need more help?
Start with a Tutorial for step-by-step guidance
Learn about the parameters for this tool to create your custom solution.
The searches parameter accepts a nonempty array of search definitions. Each definition has a type and a value. You can mix methods in a single request.
literal: Use the exact wording to find, such asInspection Required.preset: Use a built-in pattern name, such asemailfor email addresses ordatefor dates.regex: Supply a regular expression for a format specific to your documents. For example,WO-[A-Z]{2}-[0-9]{5}matches a work order ID such asWO-AB-10482.
In a JSON request, send the definitions as an array. In a multipart request, send the array as a JSON-encoded string in the searches field.
Supply either searches to find and annotate in one call or selections to annotate previously identified matches.
Each definition also accepts an optional content_scope. Use all (default) for all existing text or body to exclude detected headers and footers.
Safe & Secure
Confidently process your sensitive data with pdfRest. Our platform is built for robust, Enterprise-grade security and compliance. We meet rigorous standards for GDPR and HIPAA, and our controls are independently audited to ensure strict SOC 2 Type 2 compliance. Your data's protection is our commitment.

