Display Bookmark but not Outline?

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for Java (v4)  /  Display Bookmark but not Outline?

DynamicPDF Generator for Java (v4) Forum

 May 26 2010 7:40 PM
Is there an easy way to display just Bookmarks that have been set, not the entire Outline?   That would allow showing just the useful spots in a report that have been bookmarked.  All examples I've seen allow the full outline to show in the Bookmarks section of Adobe reader.

Thanks, Dwight
 Jun 01 2010 10:25 AM
Posted by a ceTe Software moderator
Hello Dwight,

Yes, you can add only the bookmarks without tying them to the Outline without any problem using our DynamicPDF product. Below is the code for it.

Document document = new Document();
Page page1 = new Page(PageSize.LETTER);
Page page2 = new Page(PageSize.LETTER);
Page page3 = new Page(PageSize.LETTER);
page1.getElements().add( new Bookmark("Bookmark to page 1", 0, 0));
page2.getElements().add( new Bookmark("Bookmark to page 2", 0, 0));
page3.getElements().add( new Bookmark("Bookmark to page 3", 0, 0));
document.getPages().add(page1);
document.getPages().add(page2);
document.getPages().add(page3);
document.draw("Path to save the PDF document");

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 2:13 PM.