Examples of asDSCComment()


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

        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            if (event.isLine()) {
                sb.append(event.asLine().getLine()).append('\n');
            } else if (event.isDSCComment()) {
                if (DSCConstants.END_RESOURCE.equals(event.asDSCComment().getName())) {
                    break;
                }
            }
        }
        return sb.toString();
View Full Code Here

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

    protected static DSCComment gotoDSCComment(DSCParser parser, String name)
            throws IOException, DSCException {
        while (parser.hasNext()) {
            DSCEvent event = parser.nextEvent();
            if (event.isDSCComment()) {
                DSCComment comment = event.asDSCComment();
                if (comment.getName().equals(name)) {
                    return comment;
                }
            }
        }
View Full Code Here

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()

                //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
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.