}
}
private void updateTargetLocation(PDFGoTo pdfGoTo, GoToXYAction action)
throws IFException {
PageReference pageRef = this.documentHandler.getPageReference(action.getPageIndex());
if ( pageRef == null ) {
throw new
IFException("Can't resolve page reference @ index: " + action.getPageIndex(), null);
} else {
//Convert target location from millipoints to points and adjust for different
//page origin
Point2D p2d = null;
p2d = new Point2D.Double(
action.getTargetLocation().x / 1000.0,
(pageRef.getPageDimension().height - action.getTargetLocation().y) / 1000.0);
String pdfPageRef = pageRef.getPageRef();
pdfGoTo.setPageReference(pdfPageRef);
pdfGoTo.setPosition(p2d);
//Queue this object now that it's complete
getPDFDoc().addObject(pdfGoTo);