Jump to content
Changes to the Jaspersoft community edition download ×

JRViewer print button always prints A4 paper


2004 IR Help

Recommended Posts

By: Jorn T. Nordahl - jorntnordahl

JRViewer print button always prints A4 paper

2005-04-22 14:30

I'm trying to solve a bug we have found, where the user clicks the Print button showing in the JRViewer class.

 

When clicked, a print dialog comes up allowing user to select between prints etc, but not allowing user to chooser paper format.

 

Clicking print sends a A4 formated report to our printer which causes our printer to slightly nuts with lots of red blinking lights (:-)

 

Annyhow... any way we can get around this?

 

This is on Windows XP...

 

Here is the trail I've followed:

 

JRViewer -->

JasperPrintManager.printReport(jasperPrint, true); -->

return JRPrinterAWT.printPages(

jasperPrint,

firstPageIndex,

lastPageIndex,

withPrintDialog

); -->

 

PrinterJob printJob = PrinterJob.getPrinterJob();

PageFormat pageFormat = printJob.defaultPage();

Paper paper = pageFormat.getPaper();

...

printJob.print();

 

These last few classes are from java.awt.print package, and I can't find a way to modify these by way of properties....

 

Any help would be greatly apreciated...

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...