如何使用iTextSharp的pdf格式页面的超链接添加到网页

问题描述:

我要添加或创建PDF页面的底部有一个超链接,它会通过的 iTextSharp的重定向到另一个页面。而接下来的事情,例如,如果我有50页的PDF文件。加3页到它。并在第50页我想在页面底部2的超链接。一去的第51页,另一种为第52页。接下来的事情是,如果我在第51页和第52页单击后退按钮也将来到第50页。

I want to add or create a hyperlink in bottom of the PDF page and it will redirecting to another page by using itextsharp. and next thing is for example if i have 50 pages PDF file. add 3 pages to it. and in 50th page i want 2 hyperlinks at bottom of the page. one to go for 51st page and another one to for 52nd page. next thing is if i am click back button in 51st page and 52nd page also it will come to 50th page.

使用PdfAnnotation创建链接

Using PdfAnnotation to create link

PdfAnnotation annotation;
                annotation = PdfAnnotation.CreateLink(
                stamper.Writer, rect, PdfAnnotation.HIGHLIGHT_INVERT,
                new PdfAction(string.Format(IMDB, screening.movie.Imdb))
              );
              stamper.AddAnnotation(annotation, page);

更多细节参考此链接

More details to refer this link

http://kuujinbo.info/iTextInAction2Ed/index.aspx?ch=Chapter07&ex=TimetableAnnotations2