Auto-link phone numbers in a pdf file
In Adobe Acrobat, you can process a document using the "Create Links from URLs" function to automatically detect email and web links in a pdf file and make them live links.
I want to do the same thing for phone numbers.
You can manually tag phone numbers using the tel: code. (tel:+000000000). and they will be active links when viewed from a smartphone. (click the link to initiate a phone call)
I am looking for a script or third party plug-in that can automatically detect phone numbers and tag them. Has anyone run across anything that might do this?
This is probably not a design question, but someone here must have run into this before.
Okay, you can probably script it to automate this even more but this should get you started in a fairly efficient way of doing it.
First, find your phone numbers and replace them with one of the Android+iOS accepted formats. According to Tutsplus:
555-5555 (iPhone Only)
(555) 555-5555 (Android + iPhone)
+1 (555) 555-5555 (iPhone Only)
555 5555 (iPhone Only)
555 555 5555 (Android + iPhone)
+1 555 555 5555 (iPhone Only)
555.5555 (iPhone Only)
555.555.5555 (Android + iPhone)
+1 555.555.5555 (iPhone Only)
So let's use the decimal point style, 555.555.5555. Do a find and replace using GREP.
\(?(\d\d\d)\)?[-. â€‘]?(\d\d\d)[-. â€‘]?(\d\d\d\d)
Now your phone numbers should be
Now do another find searching for
tel:^9^9^9.^9^9^9.^9^9^9^9. Click find, then click
New Hyperlink from URL. Then find next and repeat.
Once done doing
New Hyperlink from URL do another find and replace to remove the
tel: from the phone numbers. If you want you can even change the format again.
That find next and repeat is something you could probably script but that's up to you.