landscape « Graphics « Java Swing Q&A





1. Printing in landscape mode.    coderanch.com

Is there something special I have to know/do to get my paper to print in Landscape mode? I'm putting up a printer dialog with PrinterJob pj=PrinterJob.getPrinterJob(); pj.setPrintable(this); if (pj.printDialog()) { try{ pj.print(); } catch (Exception e) { e.printStackTrace(); } } In the dialog, I'm clicking on the Properties...button, then selecting the Landscape radio button. In my print() method, I'm using PageFormat.getImageableHeight() ...

2. Help Printing in Landscape form    coderanch.com

Hello am using the folooing code to print. However when the printing window comes up and I choose "Landscape" it never ptints in Landsacpe form. It always prints in "Portarit" what am I doing wrong? hers the code. Thanks for reading. import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.print.*; class Print1 extends JFrame implements ActionListener { public static void main(String[] args) ...

3. AWT Printing Landscape/Portrait    coderanch.com

Hello all, thanks for any help in advance. I'm currently attempting to print from AWT with Graphics2D and a Pageable object to a print driver that converts the printout to PDF(PDF995). For everything to be formatted correctly I need to print everything in portrait, with the width and height sized according to the actual orientation. Everything works perfectly, except if I ...