How to make the bookmarks become visible when opening a PDFBox generated file

Posted on May 19, 2010. Filed under: Uncategorized | Tags: , , , , |

I was wondering how to make the PDF reader show the bookmarks when opening a PDF file I generated with Apache’s PDFBox java library.

It turns out that the following did the trick for me:

PDDocument document = new PDDocument();
...
document.getDocumentCatalog().setPageMode(PDDocumentCatalog.PAGE_MODE_USE_OUTLINES);
....

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

One Response to “How to make the bookmarks become visible when opening a PDFBox generated file”

RSS Feed for Andre Holzner's Blog Comments RSS Feed

Thank you for the hint. I was wasting a lot of Time to get this nice Detail working.


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: