Examples of asDSCComment()


Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

                //Write original comment that ends the header comments
                event.generate(gen);
                break;
            }
            if (event.isDSCComment()) {
                DSCComment comment = event.asDSCComment();
                if (DSCConstants.LANGUAGE_LEVEL.equals(comment.getName())) {
                    DSCCommentLanguageLevel level = (DSCCommentLanguageLevel)comment;
                    gen.setPSLevel(level.getLanguageLevel());
                }
            }
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

            switch (event.getEventType()) {
            case HEADER_COMMENT:
                handler.startDocument("%!" + ((DSCHeaderComment)event).getComment());
                break;
            case DSC_COMMENT:
                handler.handleDSCComment(event.asDSCComment());
                break;
            case COMMENT:
                handler.comment(((PostScriptComment)event).getComment());
                break;
            case LINE:
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

    public DSCComment nextDSCComment(String name, PSGenerator gen)
                throws IOException, DSCException {
        while (hasNext()) {
            DSCEvent event = nextEvent();
            if (event.isDSCComment()) {
                DSCComment comment = event.asDSCComment();
                if (name.equals(comment.getName())) {
                    return comment;
                }
            }
            if (gen != null) {
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

    public static DSCComment nextPageOrTrailer(DSCParser parser, PSGenerator gen)
                throws IOException, DSCException {
        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            if (event.getEventType() == DSC_COMMENT) {
                DSCComment comment = event.asDSCComment();
                if (DSCConstants.PAGE.equals(comment.getName())) {
                    return comment;
                } else if (DSCConstants.TRAILER.equals(comment.getName())) {
                    return comment;
                }
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

                } else if (DSCConstants.TRAILER.equals(comment.getName())) {
                    return comment;
                }
            } else if (event.getEventType() == EOF) {
                //The Trailer may be missing
                return event.asDSCComment();
            }
            if (gen != null) {
                event.generate(gen); //Pipe through to PSGenerator
            }
        }
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

            switch (event.getEventType()) {
            case HEADER_COMMENT:
                handler.startDocument("%!" + ((DSCHeaderComment)event).getComment());
                break;
            case DSC_COMMENT:
                handler.handleDSCComment(event.asDSCComment());
                break;
            case COMMENT:
                handler.comment(((PostScriptComment)event).getComment());
                break;
            case LINE:
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

    public DSCComment nextDSCComment(String name, PSGenerator gen)
                throws IOException, DSCException {
        while (hasNext()) {
            DSCEvent event = nextEvent();
            if (event.isDSCComment()) {
                DSCComment comment = event.asDSCComment();
                if (name.equals(comment.getName())) {
                    return comment;
                }
            }
            if (gen != null) {
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

    public static DSCComment nextPageOrTrailer(DSCParser parser, PSGenerator gen)
                throws IOException, DSCException {
        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            if (event.getEventType() == DSC_COMMENT) {
                DSCComment comment = event.asDSCComment();
                if (DSCConstants.PAGE.equals(comment.getName())) {
                    return comment;
                } else if (DSCConstants.TRAILER.equals(comment.getName())) {
                    return comment;
                }
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

                } else if (DSCConstants.TRAILER.equals(comment.getName())) {
                    return comment;
                }
            } else if (event.getEventType() == EOF) {
                //The Trailer may be missing
                return event.asDSCComment();
            }
            if (gen != null) {
                event.generate(gen); //Pipe through to PSGenerator
            }
        }
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.events.DSCEvent.asDSCComment()

                    case DSCParserConstants.HEADER_COMMENT:
                    case DSCParserConstants.COMMENT:
                        //ignore
                        break;
                    case DSCParserConstants.DSC_COMMENT:
                        DSCComment comment = event.asDSCComment();
                        if (comment instanceof DSCCommentBoundingBox) {
                            DSCCommentBoundingBox bboxComment = (DSCCommentBoundingBox)comment;
                            if (DSCConstants.BBOX.equals(bboxComment.getName()) && bbox == null) {
                                bbox = (Rectangle2D)bboxComment.getBoundingBox().clone();
                                //BoundingBox is good but HiRes is better so continue
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.