title: Links are not working while Merge PDF using itextsharp
body: <p>My task is to merge multiple pdf to single pdf and I can achieve the merger pdf but I am facing issue in the internal links (named destination) are missed up from second pdf where as its working in first pdf. My issues are similiar to the below post.</p>
  
  <p><a href="https://stackoverflow.com/questions/12210002/pdf-merge-issue-in-itextsharp-after-merging-pdfs-dont-retain-their-values">Pdf Merge Issue in ItextSharp (After Merging Pdfs don&#39;t retain their Values)</a></p>
  
  <p>But I did not achieve this.</p>
  
  <p>My code are below.</p>
  
  <pre><code>class Program
      {
          static void Main(string[] args)
          {
              Document document = new Document();
  
              string[] fileNames = @"D:\PDF_Protect\ToMerge\Test\pdf1.pdf;D:\PDF_Protect\ToMerge\Test\pdf2.pdf;D:\PDF_Protect\ToMerge\Test\pdf3.pdf;".Split(';');
              string outFile = @"D:\PDF_Protect\ToMerge\output\merged.pdf";
  
             //merge one
              PdfCopy pdf = new PdfCopy(document, new FileStream(outFile, FileMode.Create));
              document.Open();
              foreach (string fileName in fileNames)
              {
                  PdfReader reader = new PdfReader(fileName);
                  reader.ConsolidateNamedDestinations();
                  var pdfDestination = new PdfDestination(PdfDestination.FIT);
                  //var pdfAction = PdfAction.GotoLocalPage(1, pdfDestination, pdf);
                  //pdf.SetOpenAction(pdfAction);
                  pdf.AddDocument(reader);
                  reader.Close();
              }
              document.Close();
          }
      }
  </code></pre>
  
  <p>Kindly guide me how to regenerate the links working throughout the merged pdf.</p>