print paper problem

hi,

I'm develop a print applet on jasperreport. When I preview the report on Jasperreport JRViewer, it is very good. But when I print it to a client printer, the result is ALWAYS A4 paper. The page size I set in jasper report doesn't work.

in jasper report xml, the orientation=portrait, width=860, height=269. So I change the printer page to 860X269(widthXheight) and print it. That works but the result is 269X860(widthXheight). Anyone can help me? I'm working on JDK1.4.2-08.

yours,

pierre

[526 byte] By [pierre19458a] at [2007-10-3 3:43:32]
# 1

this is my code:

URL url = new URL(getCodeBase(), "......");

URLConnection con = url.openConnection();

con.setUseCaches(false);

InputStream in = con.getInputStream();

ObjectInputStream objStream = new ObjectInputStream(in);

final JasperPrint jasperPrint = (JasperPrint)objStream.readObject();

JRViewer viewer = new JRViewer(jasperPrint);

this.pnlMain.add(viewer, BorderLayout.CENTER);

if (jasperPrint != null)

{

JasperPrintManager.printReport(jasperPrint, false);

}

pierre19458a at 2007-7-14 21:39:34 > top of Java-index,Desktop,Core GUI APIs...
# 2
I found I can't print a 680*269 report. Whatever I change the destination to landscape or portrait, the printer always print 269*680 report. It's not a problem of Jasperreport.Message was edited by: pierre19458
pierre19458a at 2007-7-14 21:39:34 > top of Java-index,Desktop,Core GUI APIs...