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!


Do you need to write or read JPEG in Java?

We have an easy guide on how to write JPEG in Java using ImageIO and JDeli. You can learn how to read/write most of the image files in ImageIO. However, it gives little control over the process.

JDeli is easy to use and offers complete support, so why not give JDeli a try?

Find out:

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.

Enabling SVG Gzip Compression on Apache and NGINX

Gzip compression is a widely supported method of reducing the size of the content sent from a web server in order to improve the...
Leon Atherton
46 sec read

Leave a Reply

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

IDRsolutions Ltd 2020. All rights reserved.