1

I'm creating a document in Word 2007 on Windows XP, and using the "Save As PDF" add-in. The document contains hyperlinks.

When I open that PDF in Preview.app on a Mac (OS X 10.5.8), I see ugly boxes around all the hyperlinks. I've tried editing the PDF in Acrobat Pro 9.2.0 on the Mac, but the boxes don't show up there. If I select a hyperlink anyway with the Link Tool, right-click, and select "Properties..." no properties dialog ever appears.

I want the links to be clickable, but I want them to look decent. How can I fix them? I don't have Acrobat for Windows.

3 Answers 3

6

Well, I thought I'd found a better way, but it turns out that Word 2007's "Save as PDF" add-in creates unusual links in PDFs. It leaves out the borderWidth property entirely. Acrobat assumes that borderWidth defaults to 0, so the links look fine. Preview.app defaults borderWidth to 1, so the links have a black box.

Unfortunately, Acrobat Pro 9 for Mac can't edit the link's properties through the GUI, probably because of the missing attribute. It can edit the exiting properties through JavaScript, but it won't let you set an attribute that's not already there.

As a quick hack, the following JavaScript will add a menu item to Acrobat called "Make links invisible" - place it in your ~/Library/Application Support/Adobe/Acrobat/9.0_x86/JavaScripts directory. It changes the borderColor to white. If you have closely-set type, that won't be any better than black; for my purposes, it worked well enough. It might actually be possible to get the attributes from the existing link, remove it, and create a new link with a proper borderWidth, but I didn't bother trying.

As it turns out, Word 2007 does SO many bad things to the PDF (embedding duplicate fonts, etc) that I ended up buying the Windows version of Acrobat Standard; it adds an Acrobat menu to the Ribbon, and its output looks great.

app.addMenuItem({
  cName:"Make links invisible", 
  cParent:"Tools",
  cExec:"makeLinksInvisible();"
});

function makeLinksInvisible() {
  for ( var p = 0; p < this.numPages; p++) 
  {
    var box = this.getPageBox("Crop", p);
    var links = this.getLinks(p, box);

    for each (l in links) {
      l.borderColor = color.white;
    }
  }

}
2
  • Very complete and detailed answer, don't hesitate to mark it as accepted one, even if you answered to your own question (read here for more details about it: blog.stackoverflow.com/2009/01/accept-your-own-answers).
    – Gnoupi
    Nov 16, 2009 at 15:18
  • Thanks for the link! I had assumed that accepting my own answer would artificially inflate my score, but I see that's not the case.
    – Jay Levitt
    Dec 21, 2009 at 14:39
4

Write the text you want to become hyperlinks as normal blue and underlined words in your Word document, so that they look like hyperlinks.

Convert the document to PDF and open it.

In Acrobat select Tools -> Advanced editing -> Link tool

Mark the section/word(s) in the PDF document that you want to convert into a hyperlink.

Select "Invisible rectangle" under Link type, and select "Open a web page" under Link action.

Click next and enter the hyperlink destination/Internet address.

Click on the Hand icon/symbol button in the Adobe menu (top of page), which removes the colour marking around the rectangle.

Save the document, File -> Save as.

here's a Video Tutorial: Adding Hyperlinks To Your Documents Using Adobe Acrobat

Source

1
  • Thanks! That's the long way round, but it gave me the right words to find a better solution. I'd upvote you but I don't have 15 points yet.
    – Jay Levitt
    Nov 3, 2009 at 16:39
1

Man, that Word-generated PDF was ugly.

My idiot-simple solution: don't use Word-generated PDFs. Instead download PDFCreator (free&open source), "print" as PDF and use that instead. No ugly boxes, no strange fonts, just the document as it would be printed. Of course, hyperlinks are not preserved; if you're into that kind of stuff, I'd recommend LaTeX ;-)

1
  • 1
    Using PDFCreator is the right answer, absolutely! Especially since the latest version (1.2.3) DOES preserve hyperlinks.
    – user107953
    Dec 3, 2011 at 6:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .