Having only recently ran into the same problem, I'm only now, belatedly, joining this discussion. Here's how I solved this problem under Linux.
(1) Uncompress the input PDF file infile.pdf
by using the pdftk
command
$ pdftk infile.pdf output outfile.pdf uncompress
(2) Open the uncompressed file for editing, say using vim
$ vim outfile.pdf
and search for the string Border [
to find out what is the color code used within the file for the link border. In vim
you need to search with /Border \[
. In my case, I found numerous lines such as this:
/Border [0 0 1]
indicating that the border is red.
(3) Using the border color code discovered in such a way (which in my case is red), run the global substitute command in vim
to erase the border,
:%s/Border \[0 0 1\]/Border \[0 0 0\]/g
and save the changes. (You could use another code if you just want to change the border color, say \[0 1 0\]
for green or \[1 0 0\]
for blue.)
(4) Finally, compress the edited PDF file to produced the desired PDF version fixedfile.pdf
without colored borders around the links:
$ pdftk outfile.pdf output fixedfile.pdf compress
That was a fairly minimal file edit that removed the color border around the internal links while preserving them for use in navigation within the file.
Hope this will help anyone who might still be facing this problem.