Package org.locationtech.udig.printing.ui.internal

Examples of org.locationtech.udig.printing.ui.internal.PrintingEngine


                Page page = makePage(pageSize, document, template);
               
                graphics = cb.createGraphics(pageSize.getWidth(), pageSize.getHeight());
                        
                //instantiate a PrinterEngine (pass in the Page instance)
                PrintingEngine engine = new PrintingEngine(page);
               
                //make page format
                PageFormat pageFormat = new PageFormat();
                pageFormat.setOrientation(PageFormat.PORTRAIT);
                java.awt.print.Paper awtPaper = new java.awt.print.Paper();
                awtPaper.setSize(pageSize.getWidth() * 3, pageSize.getHeight() *3);
                awtPaper.setImageableArea(0, 0, pageSize.getWidth(), pageSize.getHeight());
                pageFormat.setPaper(awtPaper);
               
                //run PrinterEngine's print function
                engine.print(graphics, pageFormat, 0);
                 
                graphics.dispose();
                document.newPage();
                if (i == 0) {
                    numPages = template.getNumPages();
View Full Code Here

TOP

Related Classes of org.locationtech.udig.printing.ui.internal.PrintingEngine

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.