import java.awt.print.*;在打印包里有Paper.class和PaperFormat.class两个类,这两上类都有getWidth () 和getHeight()这两个函数,分别取得纸张的宽度与高度!!