C# iTextSharp合并pdf后超链接丢失

// 合并两个PDF
void mergePDFFiles(String[] fileList, String outMergeFile, String sy)
{
string mergePDFFiles = Server.MapPath("/pdf/" + outMergeFile);
PdfReader reader;
Document document = new Document();
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(mergePDFFiles, FileMode.Create));

        BaseFont bf = BaseFont.CreateFont(@"C:\\Windows\\Fonts\\SIMHEI.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);

        writer.PageEvent = new PdfEventHanler(sy, bf);

        document.Open();
        PdfContentByte cb = writer.DirectContent;
        PdfImportedPage newPage;
        for (int i = 0; i < fileList.Length; i++)
        {
            //reader = new PdfReader(Server.MapPath("../file/" + fileList[i]));
            reader = new PdfReader(fileList[i]);
            int iPageNum = reader.NumberOfPages;
            for (int j = 1; j <= iPageNum; j++)
            {
                document.NewPage();
                newPage = writer.GetImportedPage(reader, j);
                cb.AddTemplate(newPage, 0, 0);
            }
        }
        document.Close();
    }

            合并后文字的超链接就没有了,请大神们帮帮忙
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问