PDFsharp & MigraDoc Forum
https://forum.pdfsharp.net/

Hyperlinking to bookmark
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2949
Page 1 of 1

Author:  ronnyek [ Sun Oct 12, 2014 1:55 pm ]
Post subject:  Hyperlinking to bookmark

I followed the example of the hello world pdf migradoc example... and am not actually able to get a link I can click on and have it jump.

early on, I build table of contents with a bookmark that is not yet created by doing something like this:
Code:
  Hyperlink hyperlink = paragraph.AddHyperlink("TableData"); // I've tried this explicitly passing in Bookmark type
  hyperlink.AddText("Raw Data\t");
  hyperlink.AddPageRefField("TableData");


and then when I am actually building out the report...

Code:
var para = matrixSection.AddParagraph();
para.AddBookmark("TableData");


It actually draws the title/page number correctly, but I just cant click on it.

Author:  Thomas Hoevel [ Mon Oct 13, 2014 8:13 am ]
Post subject:  Re: Hyperlinking to bookmark

ronnyek wrote:
It actually draws the title/page number correctly, but I just cant click on it.
Are you using Adobe Reader to watch the PDF file?
I can't see an error in your code snippets.

An SSCCE and an MDDDL file might help.

Author:  ronnyek [ Tue Oct 14, 2014 12:48 am ]
Post subject:  Re: Hyperlinking to bookmark

I'll work on the two files... I have the pdf's being opened in foxit, it pops up a new tab each time I build the document. This has worked for other changes thus far... and the hello migradoc example works in foxit as well

Author:  ronnyek [ Tue Oct 14, 2014 1:15 am ]
Post subject:  Re: Hyperlinking to bookmark

Ahh my mistake, I didnt realize until just now that everywhere I've seen it work, it was working inside of the chrome pdf browser. Foxit by default leaves you with text selection tool, which doesnt allow you to click book mark links. SO if anyone is running into it, it very well could be foxit.

http://forums.foxitsoftware.com/forum/p ... e-unchecke

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/