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
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
-
Helps, but bookmarks can get lost by doing that. A solution for that issue is using the program jpdfbookmarks.– Til HundCommented May 17, 2014 at 21:20
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.
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
-
3
-