setting the orientation of the printer through PrintJob
843807Jun 29 2001 — edited Jun 29 2001i need help in setting the orientation of the printer
i am using the class printJob
Full code is here
public class printing
{
private static Properties printprefs = new Properties();
public void print_method
{
Graphics Arrpage;
Arrpage=new Graphics();
Toolkit toolkit = this.getToolkit();
printprefs.setProperty("java.awt.print.PageFormat", "PageFormat.LANDSCAPE");
// printprefs.put("java.awt.print.PageFormat", "PageFormat.LANDSCAPE");
PrintJob job = toolkit.getPrintJob(new Frame(), user, printprefs);
Arrpage= job.getGraphics();
................
Arrpage.dispose();
job.end();
its does not print in landscape.
}
}