Package org.apache.fop.render.pdf.PDFDocumentHandler

Examples of org.apache.fop.render.pdf.PDFDocumentHandler.PageReference


                    + action + " (" + action.getClass().getName() + ")");
        }
    }

    private void updateTargetLocation(PDFGoTo pdfGoTo, GoToXYAction action) {
        PageReference pageRef = this.documentHandler.getPageReference(action.getPageIndex());
        //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().toString();
        pdfGoTo.setPageReference(pdfPageRef);
        pdfGoTo.setPosition(p2d);

        //Queue this object now that it's complete
        getPDFDoc().addObject(pdfGoTo);
View Full Code Here


        }
    }

    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);
View Full Code Here

TOP

Related Classes of org.apache.fop.render.pdf.PDFDocumentHandler.PageReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.