Examples of PDFLink


Examples of com.canoo.webtest.plugins.pdftest.htmlunit.PDFLink

      final String expectedValue = StringUtils.defaultString(getText(), getHref());

      final List links = pdfPage.getLinks();
      for (final Iterator iter = links.iterator(); iter.hasNext();)
      {
      final PDFLink element = (PDFLink) iter.next();
      if (verifyLink(element, verifier, expectedValue))
        return;
    }
     
      throw new StepFailedException("No link found matching criteria.");
View Full Code Here

Examples of com.canoo.webtest.plugins.pdftest.htmlunit.PDFLink

        final String lineSep = System.getProperty("line.separator");
       
        LOG.debug(links.size() + " links found");
        for (final Iterator iter = links.iterator(); iter.hasNext();)
        {
      final PDFLink link = (PDFLink) iter.next();
            buf.append(link.getPage()).append("|");
            buf.append(link.getText()).append("|");
            buf.append(link.getHref()).append(lineSep);
        }
       
        LOG.debug("Defining current response with: " + buf.toString());
        ContextHelper.defineAsCurrentResponse(getContext(), buf.toString(), "text/plain", "http:" + this.getClass().getName());
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

        if (linkTraitFound) {
            if (!annotsAllowed) {
                log.warn("Skipping annotation for a link due to PDF profile: "
                         + pdfDoc.getProfile());
            } else if (action != null) {
                PDFLink pdfLink = factory.makeLink(ipRect, action);
                currentPage.addAnnotation(pdfLink);
            }
        }
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

        if (linkTraitFound) {
            if (!annotsAllowed) {
                log.warn("Skipping annotation for a link due to PDF profile: "
                         + pdfDoc.getProfile());
            } else if (action != null) {
                PDFLink pdfLink = factory.makeLink(ipRect, action);
                currentPage.addAnnotation(pdfLink);
            }
        }
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

        if (linkTraitFound) {
            if (!annotsAllowed) {
                log.warn("Skipping annotation for a link due to PDF profile: "
                         + pdfDoc.getProfile());
            } else if (action != null) {
                PDFLink pdfLink = factory.makeLink(ipRect, action);
                if (accessEnabled) {
                    String ptr = (String) ip.getTrait(Trait.PTR);
                    logicalStructureHandler.addLinkContentItem(pdfLink, ptr);
                }
                currentPage.addAnnotation(pdfLink);
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

                targetRect.getWidth() / 1000.0,
                targetRect.getHeight() / 1000.0);
        PDFAction pdfAction = getAction(link.getAction());
        //makeLink() currently needs a PDFAction and not a reference
        //TODO Revisit when PDFLink is converted to a PDFDictionary
        PDFLink pdfLink = getPDFDoc().getFactory().makeLink(
                targetRect2D, pdfAction);
        if (pdfLink != null) {
            String ptr = link.getAction().getStructurePointer();
            if (documentHandler.getUserAgent().isAccessibilityEnabled()
                    && ptr != null && ptr.length() > 0) {
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

                targetRect.getWidth() / 1000.0,
                targetRect.getHeight() / 1000.0);
        PDFAction pdfAction = getAction(link.getAction());
        //makeLink() currently needs a PDFAction and not a reference
        //TODO Revisit when PDFLink is converted to a PDFDictionary
        PDFLink pdfLink = getPDFDoc().getFactory().makeLink(
                targetRect2D, pdfAction);
        if (pdfLink != null) {
            PDFStructElem structure = (PDFStructElem) link.getAction().getStructureTreeElement();
            if (documentHandler.getUserAgent().isAccessibilityEnabled() && structure != null) {
                documentHandler.getLogicalStructureHandler().addLinkContentItem(pdfLink, structure);
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

                // transform rect to absolute coords
                AffineTransform transform = currentState.getTransform();
                rect = transform.createTransformedShape(rect).getBounds2D();

                int type = internal ? PDFLink.INTERNAL : PDFLink.EXTERNAL;
                PDFLink pdflink = pdfDoc.getFactory().makeLink(
                            rect, dest, type, yoffset);
                currentPage.addAnnotation(pdflink);
            }
        } else {
            log.warn("Skipping annotation for a link due to PDF profile: " + pdfDoc.getProfile());
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

            AffineTransform transform = currentState.getTransform();
            rect = transform.createTransformedShape(rect).getBounds2D();
            rect = currentBasicTransform.createTransformedShape(rect).getBounds2D();

            int type = internal ? PDFLink.INTERNAL : PDFLink.EXTERNAL;
            PDFLink pdflink = pdfDoc.getFactory().makeLink(
                        rect, dest, type, yoffset);
            currentPage.addAnnotation(pdflink);
        }
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFLink

            AffineTransform transform = currentState.getTransform();
            rect = transform.createTransformedShape(rect).getBounds2D();
            rect = currentBasicTransform.createTransformedShape(rect).getBounds2D();

            int type = internal ? PDFLink.INTERNAL : PDFLink.EXTERNAL;
            PDFLink pdflink = pdfDoc.getFactory().makeLink(
                        rect, dest, type, yoffset);
            currentPage.addAnnotation(pdflink);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.