Open Source Command Line Tools to Remove Hyperlinks in PDFs?

5,446

Solution 1

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

Solution 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.

Share:
5,446

Related videos on Youtube

Rakesh
Author by

Rakesh

Updated on September 18, 2022

Comments

  • Rakesh
    Rakesh over 1 year

    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.

  • Til Hund
    Til Hund almost 10 years
    Helps, but bookmarks can get lost by doing that. A solution for that issue is using the program jpdfbookmarks.
  • CodeMedic
    CodeMedic over 5 years
    That did not work for me. I was using pdftk 2.02
  • Tom
    Tom over 5 years
    Neither for me pdftk 2.02