I'm trying to figure out why the Java Print API can't handle paper sizes where the width is greater than the height. The MediaSize class and all of it's inner classes only have sizes where the height is greater then the width. I am trying to print labels that are 4" x 2" but the print job that I wrote always converts it to 2" x 2" on the paper.
I've found some things online that state that the height must always be greater than the width and have seen in the Java source checks for this with accompanying messages that this is the case but cannot find a reason why.
Does anybody know why this is?
It is true that the paper width must not be greater than the paper heaight (see JavaDoc for MediaSize - description of constructor exception).
This is indeed the question of a paper orientation (i.e. PaperFormat). If you are not able to resolve the problem, the source codes or more exact use-case description might help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With