One of my favourite features of the PDF file is the ability to add links so that the user can move between pages. Not only can you have clickable links on a page (which can take you to other documents or sites) but you can also have an list of bookmarks – a proper index. Here is an example of the Adobe PDF Reference Specification in our PDF viewer.

The text can be set by the user – in this case Adobe has used the Chapter and section headings of the printed version – and links nested to any depth. Clicking on the link takes you there. Not only can it specify a page, but a position on a page and you can have some other fancy tricks like altering the scaling to fit. This makes the PDF experience both more like a traditional book and also interactive.
The actual data for the Bookmarks is stored in a set of linked PDF objects and you can scan down the tree to extract all the data. If you want to play with bookmarks outside the Viewer, we have written a code example to convert them into a single XML tree.
Are you a Developer working with PDF files?
Our developers guide contains a large number of technical posts to help you understand the PDF file Format.
Find out more about our software for Developers
|
|
|
Good article, but could I ask some question about pdf bookmark? because we are struggling about what kinda format will be used to archiving, and also retrieve when user needs, but we will archive entire big pdf, but we would like to use bookmark to be “rang of pages”, but I checked spec of pdf, it seems like bookmark is only indicate to specific page, not a range, is it true?
Hi Vincent,
The PDF book mark is designed to take you to a specific page so it would not make sense for it to be a range.
If you want to learn about PDF files, we have a whole series of articles on the PDF file format at https://blog.idrsolutions.com/2013/01/understanding-the-pdf-file-format-overview/