4

Are there any Open Source Tools to Remove PDF links in Ubuntu. I use PDFtk and i am not able to find any internal links in it. Due to the Internal links my python script that uses PyPdf to merge the PDF files into one file fails.

3 Answers 3

3

A simple step to remove all the hyper links from a PDF is by printing, that is by choosing print to file option. but this process doesn't remove the highlight of the hyper link. hope this helps

1
  • Helps, but bookmarks can get lost by doing that. A solution for that issue is using the program jpdfbookmarks.
    – Til Hund
    May 17, 2014 at 21:20
2

For PDF-files generated with latex and hyperref the following works:

sed '/Link/d' < file.pdf > file-without-links.pdf

This command removes all lines containing the string Link from the file, which (in my case) were responsible for defining the hyperlinks.

0

When I extract the pages from a PDF with pdftk and assemble them again afterwards the links are gone. Example:

mkdir temp
cd temp
pdftk ../FileWithLinks.pdf burst
pdftk *.pdf cat output ../FileWithLinksRemoved.pdf
2
  • 2
    That did not work for me. I was using pdftk 2.02
    – CodeMedic
    Dec 28, 2018 at 14:57
  • Neither for me pdftk 2.02
    – Tom
    Jan 17, 2019 at 10:42

You must log in to answer this question.

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