• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1548
  • Last Modified:

Jasper reports Media problem

Hello experts,

I currently have Java application which uses Jasper Reports for printing invoices. I am now moving to a different invoice paper size (currently US Letter, moving to HalfLetter which is 8.5 x 5.5). I have defined the size in Windows Print Server->Forms correctly and can print to that media type from acrobat pdf (generated from iReport) but in the Java application the same (it looks the same anyway) printer dialogue does not offer that Media size as an option.

I don't think that this is a Jasper issue but rather a Java printing issue.

Does anyone know how to get windows defined paper sizes into the Java print service dialogue?

Please help soon as I am under the gun on this one.

Thanks in advance.

Geoff
0
gdrnec
Asked:
gdrnec
  • 2
1 Solution
 
objectsCommented:
If you want to use a set paper size, then why are you giving the user option?
Why not instead set the paper size in your application

http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-print-p3.html
0
 
gdrnecAuthor Commented:
Thanks for the reply. I have no problems enforcing a paper size on the user. However, I can't figure out how to do this. The link you posted covers the java.awt.print classes whereas I seem to have to use the javax.print classes because of Jasper. I can't see how these two meet up.

I can see how the paper size is set in the awt version using the Paper.setSize(d, d) method and using that in conjunction with the PrinterJob class but can you explain how to cross the two frameworks?

Am I making any sense?
0
 
objectsCommented:
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now