Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
How to add Bookmarks to PDF
posted

I had originnally posted the question of including bookmarks in an Infragistics Report (.igr file) (http://ko.infragistics.com/community/forums/t/73827.aspx).   According to my response, this cannot be done in the designer with the .igr file.

I was, however, able to do a bit of research and explore adding it programatically.  Props to Sung Kim for getting me there.

Refer to this link to build a PDF/XPS programmatically. (http://ko.infragistics.com/products/aspnet/sample/infragistics-documents/export-to-pdf-or-xps)

 

Then, simply add levels to your Report object (for as deep as you want to go):

report.Bookmarks.AddLevel();

 

and create an IText object, add it to the report section, and set the Heading property:

IText bookmark;
bookmark = reportSection.AddText();
bookmark.AddContent("Bookmark Text");
bookmark.Heading = TextHeading.H1;

 

 

Reference: http://ko.infragistics.com/community/forums/t/29171.aspx