There is no simple method for this, but there is an approach. I did not understand how to attach links directly to the text, so my approach means that you have to draw annotations as rectangles and text separately. It's a little rough around the edges, but it works.
PDPageXYZDestination dest = new PDPageXYZDestination();
dest.setPageNumber(3);
dest.setLeft(0);
dest.setTop(0);
PDActionGoTo action = new PDActionGoTo();
action.setDestination(dest);
PDAnnotationLink link = new PDAnnotationLink();
link.setAction(action);
link.setDestination(dest);
PDRectangle rect = new PDRectangle();
rect.setLowerLeftX(72);
rect.setLowerLeftY(600);
rect.setUpperRightX(144);
rect.setUpperRightY(620);
PDPage page =
page.getAnnotations().add(link);
PDPageContentStream stream = new PDPageContentStream(doc, page, true, true);
stream.beginText();
stream.setTextTranslation(85, 600);
stream.drawString("Page 1");
stream.endText();
stream.close();
Phew! This is the lot code. This should help you. You can make the rectangle the same color as the background of your document, if you want it to look like they just click on a link, but this requires more experimentation.