Update Link in PDF
Purpose
This API allows you to replace an existing hyperlink within a PDF.
Quick Reference
| Property | Value |
|---|---|
| Method | POST |
| Request URL | https://{zohoapis_domain}/pdfeditor/api/v1/pdf/annotation/link/update |
Body Parameters
| Parameter | Value | Mandatory/Optional | Description |
|---|---|---|---|
| file | File or String | Mandatory | Upload the PDF file from your local drive or desktop. If the PDF is available via a publicly accessible web URL, you can provide the URL using the same parameter. |
| input_options | { "target_link": "https://www.old-link.com", "new_link": "https://www.new-link.com", "link_style": { "color": "red", "rect_type": "visible rectangle" } } | Mandatory | target_link – Specify the hyperlink value of the existing hyperlinked text or area. new_link – Specify the new hyperlink value to replace the existing one. link_style(optional) – Specify how the link should be displayed. color – Specify the link color. rect_type – Specify the rectangle type for the link. |
| password | String | Optional | If the input PDF is password protected, specify the password to unlock it. |
Notes and Limits
- The maximum file size allowed for the input PDF is 50 MB. It cannot be more than 150 pages.
- To use this API, an OAuth token should be generated with the following scopes: ZohoWriter.pdfEditor.ALL
Possible Errors
Refer to the following pages for the list of possible errors for this API:
Sample Request
Copiedcurl --location --request POST "https://www.zohoapis.com/pdfeditor/api/v1/pdf/annotation/link/update" \
--header "Authorization: Zoho-oauthtoken xxx.yyy.zzz" \
--form 'file=@/Users/username/Documents/Original.pdf' \
--form 'password="abc_123"' \
--form 'input_options={"target_link": "https://old.example.com", "new_link": "https://new.example.com"}' Once the process begins, you will initially receive the 'status_url'. By invoking the 'status_url', you will be able to monitor the status of the scheduled job.
Sample Response
Copied{
"status_check_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/annotation/link/update/job/f931a01183b33",
"status": "inprogress"
}
Success Response
Copied "download_url": "https://pdf.zoho.com/pdfeditor/api/v1/pdf/annotation/link/update/download/f931a01183b33",
"status": "success"
"response_generated_time": 17340913091019
}