Skip to main content

Update Hyperlinks Annotation

PDF4meUpdate Hyperlinks Annotation

The Update Hyperlinks Annotation API updates hyperlink text and URLs in a PDF. You send the PDF (docContent Base64, docName), updatehyperlinkannotationlist (array of hyperlink update objects with SearchOn, SearchValue, IsExpression, TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue), and optionally async. The API returns the PDF with updated hyperlinks. Use the tester below to try it; more details are in the sections that follow.

Quick reference

Endpoint: POST /api/v2/UpdateHyperlinkAnnotation · Required: api-key, docContent, docName, updatehyperlinkannotationlist

Try it live

Use the form below to send your API key, PDF (Base64), and array of hyperlink update objects. The response is the PDF with hyperlinks updated. No code required—fill the fields and click Send request.

Loading API Tester...

Overview, parameters, and use cases

This endpoint updates existing hyperlinks in a PDF by changing the display text and/or the URL destination. You provide the PDF (Base64) and updatehyperlinkannotationlist (array of hyperlink update objects). Each object specifies search criteria (SearchOn, SearchValue, IsExpression), current text/URL to find, and new text/URL (TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue). The API returns the PDF with matching hyperlinks updated.

Each object in updatehyperlinkannotationlist should contain:

  • SearchOn – Search criteria type (e.g. Text)
  • SearchValue – Value to search for
  • IsExpression – Whether to use expression matching
  • TextCurrentValue – Current hyperlinked text to replace
  • TextNewValue – New display text for the hyperlink
  • URLCurrentValue – Current URL destination to replace
  • URLNewValue – New URL destination
Best for

Use when you need to fix or bulk-update hyperlinks in a PDF (e.g. change old URLs to new ones). For webhook integration use Get Document from PDF4me.

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A PDF file in Base64 format containing hyperlinks

Response Format

The API returns a PDF file with updated hyperlinks.

Get Help