Making URLs in Illustrator behave like links in a PDF

Spooky list of beers for the autumn season

Overview: A step-by-step guide to using variables within Illustrator so they behave like active links in a PDF.

Adobe Illustrator doesn’t make hyperlinking as straightforward as InDesign, but you can still create fully functional PDF links using the Variables panel.

Illustrator variables allow text URLs to behave like proper hyperlinks when saving the document as a PDF. It’s a useful feature to avoid assigning links afterward in Acrobat (painful) or needing to author your document with InDesign (fine… for multi-page publications). Illustrator can be touchy, however, so I’ve gathered a few tips to help.

What you’ll learn

This guide walks through the exact steps, common pitfalls, and a few Illustrator quirks to watch out for.

June 2023 update

The future is now! Adobe has (finally) added the capability to add links to text and images within Illustrator when saving the file as a PDF.

Select the text you’d like to behave as a link, and in the Attributes panel choose Image Map: Rectangle (or Polygon) and enter a URL 🔥🌎🔥.

 
Attributes panel allows one to add URLs to text in Illustrator
 

Why use Illustrator instead of InDesign?

I mostly work on small docs; single page flyers, detailed invoices, illustrated data sheets, infographics, small brand guides, and so on. Adobe InDesign never enters my mind until I have a document requiring 12 pages or more. Illustrator is more than sufficient to create beautifully arranged short books.

The trade off between Illustrator’s powerful tools (and multiple art boards) far outweighs the need to use InDesign’s industrial-strength publication layout capabilities. The ONLY reason InDesign saw any use around the office was for hyperlinks within the copy.

Why use Illustrator instead of Acrobat?

Adobe Acrobat is a last resort tool to edit a PDF and add hyperlinks on top of the content. This is typically fine if there’s only one or two links—perhaps a designer’s resumé where one might need to add a personal website link.

The drawback is every time the PDF is authored/updated from Illustrator (or even Photoshop), it always requires the additional step of opening the file in Acrobat, adding links, and saving it again. After doing this once or twice you’ll realize any edits or content tweaks force one to repeat this tedious process each and every time.

 

Adding URLs in Illustrator

If you're on an older version of Illustrator and don’t have access to the new attributes/image map link capabilities added in June 2023, keep reading.

How it works

The “trick” to getting URLs to behave like links rests in Adobe Acrobat’s ability to create links from any URL it “sees.” This is a default setting, so unless a person has disabled it, all URLs created in Illustrator’s variables panel will be seen by Acrobat as a hyperlink—even text with 0 opacity placed on top of objects.

Here’s a typical doc that would benefit from having links; it’s my extra spooky list of 13 fall beers found in Charlotte area grocery stores. Because it’s a PDF to be shared, each of the 13 brewery URLs should link to their actual websites.

Using the variables panel

But rather than importing this into InDesign or Acrobat to generate the hyperlinks, we’ll add the URLs directly in Illustrator using the Variables panel (Window > Variables). Such a sad, empty panel. Always hungry for data, yet rarely fed.

 
Empty Variables panel, waiting, watching...

The Variables panel. Waiting. Watching…

 
 

1. Create a new layer to hold all the URLs

Create a new layer in the Layers panel. It’s helpful to contain all the URLs on their own topmost layer to make hiding and manipulation easier (and avoid losing them). A little organization goes a long way.

 
Layer panel with links selected
 
 

2. Add individual text boxes for each URL

Place a text box containing the full URL on top of every intended link in the document (or on top of images, logos, etc.). Use the point type text box (not the paragraph type word wrapping text field). The URLs must be formatted correctly and completely (http:// etc.).

Stretch and squish the text box to fully cover the area you want as the link hot spot. I find it helpful to use a bright contrasting color to make these easier to find in the future; it doesn’t have to be pretty. The before and after look like this:

Fall is brewing list of beers

Before adding URLs

Fall is brewing list of beers with URLs overlaid

After adding URL text boxes

 

3. Convert each link to a variable

Select the text boxes one at a time and click Make Text Dynamic in the Variables panel. It’s the little gear/block icon in the panel footer. A new variable will be added showing its object as the URL from the text box.

 
Making URLs using Illustrators dynamic text variable panel

Click Make Text Dynamic to convert your URL to a new Variable Object

 
 

4. Hide the URL text

You’re basically finished, but before exporting as a PDF, we want to make all the ugly URL text invisible; the hyperlinks will still work even when hidden. Click the layer target (the little circle next to the layer name) and head over to the Transparency panel and change the entire layer Opacity to 0%. This makes it easy to hide everything at once and avoids the need to hunt down individually hidden links should we need to make future adjustments.

 
Selecting the layer target

Select the layer target

Transparency set to zero

By setting the layer target transparency, all links are affected at once

 
 

5. Export as a PDF

There’s nothing special needed to save your doc as a PDF with hyperlinks intact. File > Save a Copy… > Format > Adobe PDF. Choose whichever options are needed. I typically use [High Quality Print] but anything will work.

The Illustrator “trick” to making URL variables work in a PDF lies in Adobe Acrobat’s ability to create links from any URL it sees. This is a default setting, so unless a person has disabled it, all URLs created in Illustrator’s variables panel will be seen by Acrobat as a hyperlink.

 

Reviewing the PDF and common issues

Check your links by reviewing the PDF. Mouse over each link and make sure the URLs are correct. Acrobat usually needs a moment to recognize the URLs and generate the hyperlinks, but they should all become active hot spots shortly after opening the file.

Notes and other common issues

  • It’s helpful to leave all the link text visible at first, export the PDF, check the links, then go back and hide the layer once satisfied for the final PDF.

  • Acrobat’s ability to create hyperlinks from urls can be found under General > Create links from URLs. It’s on by default, but can be turned off—though what kind of experience would Acrobat be with links disabled ¯\_ (ツ)_/¯ This is a them problem, not a you problem.

  • As with all PDFs, clicking any links will display the usual Security Warning. This is normal for every PDF no matter how it was generated or how the links were added. It simply means “You’re about to go somewhere, ya sure?”

  • There is no way to create bookmarks within multi-page PDF docs, add file attachments, and other high-level Acrobat functions straight out of Illustrator.

  • The way PDFs export, sometimes the URL text can fracture into several pieces or wind up with missing characters (i.e. they no longer work). Sometimes exporting a PDF feels like letting a 4 year old make you a sandwich; where everything seems fine… until you eat crayons. It’s important to test every link and keep them as short possible. Too much distortion tends to ruin the URLs.

In the following examples using the exact same URL text, the left hyperlink is fine (https://www.foothillsbrewing.com/), but the right hyperlink is missing an S, O, and L (http://www.fothilsbrewing.com/), which must be Illustrator’s hilarious way of telling me I’m “SOL” (Shit Outta Luck).

 
URL on top of image beer spider image

The link is still correct in Acrobat despite being huge: https://www.foothillsbrewing.com/

Distorted URL on top of image beer spider image

Acrobat decided this link didn’t need an S, O, and L; the link is incorrect: http://www.fothilsbrewing.com/

 
 

Wrapping up

That’s all there is to it! Pretty spooky, no? For those of you who didn’t believe Illustrator could export URLs into a PDF as hyperlinks, I shun the non-believer. Though I don’t blame you because this solution is difficult to find. It’s such a tricky question to phrase correctly for quality search engine results. Anyway, I hope this helped.

If you’d like to see the setup and edits I used to create this beer photo, check out my Before and After: Magazine Beer Spot article.

Thanks for reading!