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;
}
}
}
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: http://blog.stackoverflow.com/2009/01/accept-your-own-answers/).
– Gnoupi – 2009-11-16T15:18:52.790Thanks 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 – 2009-12-21T14:39:18.827