Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Understanding the PDF file Format – Named locations

39 sec read

The PDF file format allows you to specify Destination which you can goto by clicking a link or upon certain actions. There locations can even be in other PDF files. As an example, you might have

[12 0 R /Fit]

which takes you to the Page object described by Object 12 0 R and FitsToPage. Pretty neat but a bit cryptic. So you can create an additional structure (a Name tree) which allows you to refer to the page by a label (defined in the Name tree) rather than the object. So you could have TitlePage instead of 12 0 R and the PDf file would lookup title page in the Name tree (and find 12 0 R).

Name trees make the PDF structure more understandable and also easier to maintain and change. Are you using them?

This post is part of our “Understanding the PDF File Format” series. In each article, we aim to take a specific PDF feature and explain it in simple terms. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2019. All rights reserved.