Package org.apache.fop.svg

Examples of org.apache.fop.svg.PDFDocumentGraphics2D.nextPage()


        g2d.drawString("Hello world!", 140, 140);
        g2d.setColor(Color.RED.darker());
        g2d.setFont(new Font("serif", Font.PLAIN, 36));
        g2d.drawString("Hello world!", 140, 180);

        g2d.nextPage(); //Move to next page

        g2d.setFont(new Font("sans-serif", Font.PLAIN, 36));
        g2d.drawString("Welcome to page 2!", 140, 140);

        //Cleanup
View Full Code Here


            g2d.setColor(Color.RED.darker());
            g2d.setFont(new Font("serif", Font.PLAIN, 36));
            g2d.drawString("Hello world!", 140, 180);

            pageSize = new Dimension(pageSize.height, pageSize.width);
            g2d.nextPage(pageSize.width, pageSize.height);

            //Demonstrate painting rich text
            String someHTML = "<html><body style=\"font-family:Verdana\">"
                + "<p>Welcome to <b>page 2!</b></p>"
                + "<h2>PDFDocumentGraphics2D Demonstration</h2>"
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.