Package org.apache.fop.render.pdf.PDFLogicalStructureHandler

Examples of org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo


        float x = (float)pos.getX() / 1000f;
        float y = (float)pos.getY() / 1000f;
        float w = (float)pos.getWidth() / 1000f;
        float h = (float)pos.getHeight() / 1000f;
        if (context.getUserAgent().isAccessibilityEnabled()) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.placeImage(x, y, w, h, xobj, mci.tag, mci.mcid);
        } else {
            generator.placeImage(x, y, w, h, xobj);
        }
    }
View Full Code Here


        Color ct = (Color) text.getTrait(Trait.COLOR);
        updateColor(ct, true);

        if (accessEnabled) {
            String ptr = (String) text.getTrait(Trait.PTR);
            MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr);
            if (generator.getTextUtil().isInTextObject()) {
                generator.separateTextElements(mci.tag, mci.mcid);
            }
            generator.beginTextObject(mci.tag, mci.mcid);
        } else {
View Full Code Here

     * @param h height for image
     * @param xobj the image XObject
     */
    public void placeImage(float x, float y, float w, float h, PDFXObject xobj) {
        if (accessEnabled) {
            MarkedContentInfo mci = logicalStructureHandler.addImageContentItem(imageReference);
            generator.saveGraphicsState(mci.tag, mci.mcid);
        } else {
            saveGraphicsState();
        }
        generator.add(format(w) + " 0 0 "
View Full Code Here

    }

    /** {@inheritDoc} */
    public void renderDocument(Document doc, String ns, Rectangle2D pos, Map foreignAttributes) {
        if (accessEnabled) {
            MarkedContentInfo mci = logicalStructureHandler.addImageContentItem(imageReference);
            generator.beginMarkedContentSequence(mci.tag, mci.mcid);
        }
        super.renderDocument(doc, ns, pos, foreignAttributes);
        if (accessEnabled) {
            generator.endMarkedContentSequence();
View Full Code Here

        float x = (float)pos.getX() / 1000f;
        float y = (float)pos.getY() / 1000f;
        float w = (float)pos.getWidth() / 1000f;
        float h = (float)pos.getHeight() / 1000f;
        if (context.getUserAgent().isAccessibilityEnabled()) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.placeImage(x, y, w, h, xobj, mci.tag, mci.mcid);
        } else {
            generator.placeImage(x, y, w, h, xobj);
        }
    }
View Full Code Here

    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);
            generator.beginTextObject(mci.tag, mci.mcid);
View Full Code Here

        float sy = fheight / imh;

        generator.comment("G2D start");
        boolean accessibilityEnabled = context.getUserAgent().isAccessibilityEnabled();
        if (accessibilityEnabled) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.saveGraphicsState(mci.tag, mci.mcid);
        } else {
            generator.saveGraphicsState();
        }
        generator.updateColor(Color.black, false, null);
View Full Code Here

        if (log.isTraceEnabled()) {
            generator.comment("SVG setup");
        }
        generator.saveGraphicsState();
        if (context.getUserAgent().isAccessibilityEnabled()) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.beginMarkedContentSequence(mci.tag, mci.mcid);
        }
        generator.updateColor(Color.black, false, null);
        generator.updateColor(Color.black, true, null);
View Full Code Here

        float x = (float)pos.getX() / 1000f;
        float y = (float)pos.getY() / 1000f;
        float w = (float)pos.getWidth() / 1000f;
        float h = (float)pos.getHeight() / 1000f;
        if (context.getUserAgent().isAccessibilityEnabled()) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.placeImage(x, y, w, h, xobj, mci.tag, mci.mcid);
        } else {
            generator.placeImage(x, y, w, h, xobj);
        }
    }
View Full Code Here

         * an fo:block-container
         */
        generator.comment("SVG setup");
        generator.saveGraphicsState();
        if (context.getUserAgent().isAccessibilityEnabled()) {
            MarkedContentInfo mci = pdfContext.getMarkedContentInfo();
            generator.beginMarkedContentSequence(mci.tag, mci.mcid);
        }
        generator.setColor(Color.black, false);
        generator.setColor(Color.black, true);

View Full Code Here

TOP

Related Classes of org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo

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.