Are the links really there, or just being interpreted by Acrobat and reader as links becasue they look like URLs? To be real, and relaible in other applictions, thyey would all need to appear inthe Hyperlinks panel I think.
That, of course, doesn't prevent you from aking them blue and underlined in ID. To decide the best method of achieving that we need more information, though. Are these independent paragraphs, or text on a line with other text? If with other text, is it always the same, or does it vary? Waht version of ID do you have?
A screen shot of a listing would probalby be helpful, but you should probably use some dummy text to simulate it rather than disclose anyone's private information here. You can embed an image in your posts by using the camera icon on the tweb page like this:
Create a character style that will colorize the text the way you want.
Then use the Convert URLs to Hyperlinks command in the Hyperlinks panel menu. There is a setting there that will allow you to apply that character style to the URLs.
Choose Convert or Convert All.
This should do what you want.
Sandee has a lot more experience with hyperlinks than I do, so her method of adding them is great and new to me. Using a character style is OK, but not necessary if they are paragraphs on their own. Instead you can create a paragraph style that defines the color and underline and apply it to paragraphs that are URLs.
On the other hand, if the URL is going to be part of other running text, the character style will be a necessity, and the tip about adding the style to the hyperlinks is a lot easier than writing a GREP expression that will recognize all the possible combinations for domains, which would be necessary to make a GREP style. You could use an ordinary nested style, I suppose, but you'd most likely need that GREP anyway to add end nested style here markers unless there was some special punctuation pattern involved, like Email: email@example.com where you could do none through 1 colon, then your character style through one word.
I don't mean to contradict you, but unless you do use a complicated GREP string, the best way to find and color those URLs is to let the Adobe engineer's codes find them.
But, there is no way I know to assign the hyperlinks a style except with a character style. So unless the text comes in already tagged as the URL, it's best to let the Hyperlink command do the work.
No, no. You and I are in total agreement as far as how to to tag the URLs with a character style, if that's what you want to do. Since my workflow is for print exclusively, I don't have much use for the Hyperlinks panel, and if there was not the consideration of wanting to be sure that the addresses are clickable in all viewers I think, in this particular case where the addresses are in their own paragraphs, it would be less work to define a paragraph style with the color and underline.
But that's just me, and given the desire for clickability I think your method is perfect, presuming that you really can automagically add the URLs to the panel. I'll try to remember it. The only reason I rambled on, really was to give some hints about how to style something like this in running text if you don't have that magic bullet (i.e. in the case of something that is NOT a URL, like a phone number, or a job title).
Character style is the way to go.
But Amikoe's document exists already and so the challenge is formatting the existing email addresses with the character style. Without doing all of them manually. All several hundred of them.
I think in the current document format, it wouldn't take all that long manually applying a paragraph style. In the case of having them existing within a block of text, it is a pita to applying character styles by hand.
I have no solution to the grep style. Should be able to be written--and I thought I read a thread a (long) while back but cannot find it. It also should be able to be scripted--but the script would pretty much use the same find string I would think. I also don't know of the grep performance impact on this many hyperlinks.
I remeber that same discussion, I think, about using GREP to find a URL. And I don't recall for sure if the conclusion was some really long expression that was all-inclusive, or that it was pretty much impossible given the variety of allowable characters and possible domains. Obviously, if Sandee is correct, the engineers have already done the coding and have that all-inclusive expression, so it's moot.
If the goal is strictly email addresses, though, I think something like \<.+@.+\..+\>? ought to work, but I haven't tested it.
And given that this is a directory project, and could likely be done with Data Merge, I'm not convinced that character styles are automatically the way to go. Even without Data Merge, if the number of paragraphs per listing stays the same, a set of rotating paragraph styles would allow you to format the whole thing in one go.
I tried it, using Sandee's idea and IT WORKS PERFECTLY. The thing is, some lines/paragraphs have 1 email address, some have 2 (like in the sample I posted above), but some have a Fax number and an email address on the same line.... So Sandees idea works perfectly for me, especially when I always try to go the simplest way, not being a big ID expert....
...Thanks so much for all your time, Sandee, Peter and Mike.....
I am not a Grep expert but this is just trying and i hope it help, try this grep:
and befor you apply the grep make sure to create a character style that colorize and underlined your emails.
Please note that making text blue and underlined will not automagically make it an e-mail link.
While Acrobat Reader has an option to automatically recognize URLs and mail addresses, most sane people will turn this off, as it has to make assumptions on "what is a mail address". Also, when viewing the PDF with another application you will not be able to click these 'hyperlinks'.
Sandee's solution works best because it does two things at the same time: (1) it adds a character style of your choice to text strings that conform to an e-mail address, and (2) it adds a hyperlink in the format required for an e-mail link.
With solutions involving GREP, you can only add formatting.
Jongware, Interesting... I was under the impression that Acrobat Reader (or as the public calls it "Adobe Reader") in general, not only mine, is smart enough to recognize an email address as such... If the default setting is to do so, we can safely asume that the average person would not turn that feature off, since most people don't bother, not even knowing how to change anything in Reader (from my experience with clients, at least).
But I'm glad you agree that Sandee's idea was the right idea. Still, I'm now testing how well this works also on Tablets and SmartPhones...
Well, one of the most common problems with hyperlinks is that "they don't work". That happens when (1) there are no 'real' hyperlinks in the exported PDF, and (2) people rely on the automatic system instead.
I'd have to experiment to see what Acrobat's behaviour is when you combine 'real' hyperlinks with the auto-recognized ones.
But you are right to test it in other readers as well, which may not be as smart as Acrobat. Just for laughs, try Mac OSX's Preview as well -- a second source of continuous frustration.
...That's why I'm glad to use Sandee's idea, which creates real hyperlinks, before exporting into PDF... Though, again, I'm still not sure how the PDF file would behave as far as those hyperlinks on tablets and Smartphones. I'm not worried about any other reader than Reader.... we all agree that "Adobe" is what the wide public is using to read PDF files...
As far as tablets and smartphones, it's a craps shoot. There's no way to anticipate which PDF viewer will work with any extended PDF functions.
The Adobe Reader for iPhone provides some features, but not all. Good Reader (which costs $) is the best, but you can't force customers to buy something just to read your PDF. And even it doesn't do everything.
And then just when you have dismissed a product as not providing the function, it gets upgraded and now it does.
There's a built-in PDF viewer in an iPhone, but I've only been able to access it when opening PDF files on my DropBox.
It's really so bad that I would simply warn readers that the most optimal way to read the PDF is on an actual computer, not iOS or Android device.
That's what I told my client, not to expect too much... But I guess it's an evolving technology that would get better with time...
...What's your experience with opening those PDF files on the iPad?
Same as the iPhone. Only there's more room on the screen.
I actually created a PDF out of the ID test, and emailed it to my iPod... Opening the file on the iPod did not show those blue, underlined addresses as hyperlinked, tapping on them with my finger or stylus did not open a Mail message window with that address on top... But I'm not really sure, when opening those PDF files that it was launching ACROBAT.... Maybe it did launch Preview?........
It's not Preview but it is the internal PDF reader for the iPhone.
With the PDF open, look for the little symbol that is used for sharing. There should be an entry for "Open In..." Choose Adobe Reader and you'll know if it is opening there.
But you see the problems with relying on people to follow those directions.
Exactly, the file is distributed to some 600 families, who knows what they use.... I think the only safe tool to use the hyperlinks is a Mac or a PC. For now, at least....