Hi all I have created Link below is the code
public void AddPdfPage(int idx) { page = inputDocument1.Pages[idx]; page = outputDocument.AddPage(page); gfx = XGraphics.FromPdfPage(page); }
public void AddLinksFirstPage(string strText, string strPageText, int intLPage, int index, int intSelWidth) { font = new XFont("Arial", 11, XFontStyle.Regular | XFontStyle.Underline); link = gfx.Transformer.WorldToDefaultPage(new XRect(new XPoint(70, 100 + (index * 20)), new XSize(530, 15 * intSelWidth))); lin = new PdfRectangle(link);
gfx.DrawString(strText, font, XBrushes.Blue, 70, 100 + (index * 20), XStringFormat.TopLeft); font = new XFont("Arial", 11, XFontStyle.Regular); gfx.DrawString(strPageText.PadLeft(10), font, XBrushes.Blue, 530, 100 + (index * 20), XStringFormat.TopCenter);
page.AddDocumentLink(lin, intLPage); }
this call for multiples pages
i hope the problem is at Elements[Keys.Dest] = new PdfLiteral("[{0} 0 R/XYZ null 0 null 0]", dest.ObjectNumber);
but when kept "XYZ null null 0" with "FITB" working, i need inherit mode.
any feedback will be great.
Thanks Nagarjuna
Attachments: |
File comment: focus to 26 page
![Third.JPG](./download/file.php?id=154&sid=930d14bfb2ebbe4fb15146f86209c1ba)
Third.JPG [ 156.36 KiB | Viewed 3894 times ]
|
File comment: click on index with page focus to 7
![Second.JPG](./download/file.php?id=153&sid=930d14bfb2ebbe4fb15146f86209c1ba)
Second.JPG [ 152.78 KiB | Viewed 3894 times ]
|
File comment: generated pdf
![First.JPG](./download/file.php?id=152&sid=930d14bfb2ebbe4fb15146f86209c1ba)
First.JPG [ 150.56 KiB | Viewed 3894 times ]
|
|