Examples of PDFStructElem


Examples of org.apache.fop.pdf.PDFStructElem

        //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);
            }
            documentHandler.currentPage.addAnnotation(pdfLink);
        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFStructElem

    }

    private static class TableCellMapper implements Mapper {

        public PDFName getStructureType(PDFObject parent) {
            PDFStructElem grandParent = ((PDFStructElem) parent).getParentStructElem();
            //TODO What to do with cells from table-footer? Currently they are mapped on TD.
            PDFName type;
            if (THEAD.equals(grandParent.getStructureType())) {
               type = STANDARD_STRUCTURE_TYPES.get("TH");
            } else {
                type = STANDARD_STRUCTURE_TYPES.get("TD");
            }
            assert type != null;
View Full Code Here

Examples of org.apache.fop.pdf.PDFStructElem

    public void drawImage(String uri, Rectangle rect)
            throws IFException {
        PDFXObject xobject = getPDFDoc().getXObject(uri);
        if (xobject != null) {
            if (accessEnabled) {
                PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
                prepareImageMCID(structElem);
                placeImageAccess(rect, xobject);
            } else {
                placeImage(rect, xobject);
            }
        } else {
            if (accessEnabled) {
                PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
                prepareImageMCID(structElem);
            }
            drawImageUsingURI(uri, rect);
            flushPDFDoc();
        }
View Full Code Here

Examples of org.apache.fop.pdf.PDFStructElem

    }

    /** {@inheritDoc} */
    public void drawImage(Document doc, Rectangle rect) throws IFException {
        if (accessEnabled) {
            PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
            prepareImageMCID(structElem);
        }
        drawImageUsingDocument(doc, rect);
        flushPDFDoc();
    }
View Full Code Here

Examples of org.apache.fop.pdf.PDFStructElem

    /** {@inheritDoc} */
    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[][] dp,
            String text)
            throws IFException {
        if (accessEnabled) {
            PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(structElem);
            if (generator.getTextUtil().isInTextObject()) {
                generator.separateTextElements(mci.tag, mci.mcid);
            }
            generator.updateColor(state.getTextColor(), true, null);
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.