0

My company has recently changed the path of one of our drives. We have countless PDFs that containing links to documents in this drive. I am looking for a way to isolate each link in a PDF and edit that link with the new path.

Example:

old link \oldpath\directory\PDFsWithLinks

new link \newpath\directory\PDFsWithLinks

What I have working so far is the user selects a folder containing PDFs. The app then loops through them and I am able to change all the links to something generic like "www.google.com" but I can't figure out how to edit just part of the link.

What I am using mainly comes from this post

using ITextSharp to extract and update links in an existing PDF

though i don't need the part about creating a new PDf.

I have also looked here Editing Hyperlink and Anchors in PDF using ITextSharp

Community
  • 1
  • 1
Helmbo
  • 33
  • 8
  • I have marked this question as a duplicate of a question that is unrelated to iTextSharp. The way I understand your question, you can get the links from an existing PDF, and you can update the links in that existing PDF (by [creating a new PDF](http://developers.itextpdf.com/question/how-update-pdf-without-creating-new-pdf)). The only problem I see in your question is *I can't figure out how to edit just part of the link.* That's just a matter of reading the link as a string and replacing part of that string (as explained in the duplicate question). – Bruno Lowagie Oct 05 '16 at 06:55
  • If my interpretation of your question is wrong, please clarify and I'll reopen the question. – Bruno Lowagie Oct 05 '16 at 06:56

0 Answers0