Free plan

Links in a PDF

List, test, remove or add clickable links in a PDF
POST
/v1/pdfs/links

About this tool

This tool works with the clickable links of a PDF: web addresses, e-mail addresses and jumps to other places in the same document. It can list them, check that each web address still answers, remove links, or turn web and e-mail addresses that are only written as text into clickable links. Checking is limited to a small number of addresses at a time.
For example, before sending a brochure to customers you check that none of its web links are broken.

How to use it

  1. Choose this tool.
  2. Add your PDF.
  3. Choose what to do: list the links, check them, remove them, or make written addresses clickable.
  4. If you like, limit it to certain pages or to one kind of link, such as web or e-mail.
  5. Press Generate, then read the result or download the new PDF.

What you get back

For list and check you get a report of the links found and, for check, whether each web address answered. For remove and make clickable you get a new PDF to download.
GOOD TO KNOW
check only asks public web addresses through the same guarded downloader as URL inputs (private and local addresses are reported as not reachable). auto-link needs a text layer. Counts as one PDF operation.
TEST IT LIVE

Try Links in a PDF in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/links
Tool ID
pdfs.links
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/links" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'operation=list' \
  -F 'pages=1-3' \
  -F 'kind=all'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.links({
    "file": 'document.pdf',
    "operation": "list",
    "pages": "1-3",
    "kind": "all"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->links([
    'file' => 'document.pdf',
    'operation' => 'list',
    'pages' => '1-3',
    'kind' => 'all',
]);
echo $result->requestId;
FAQ

Frequently asked questions

List the links of a PDF (web, e-mail and jumps inside the document), check that the web addresses answer, remove links, or make the web and e-mail addresses written in the text clickable.

Links in a PDF accepts PDF. You can send several files in one request.

Links in a PDF is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/links with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.