Wednesday, August 1, 2007

JAVA Printer vs Customize Paper Size

How to printing in my paper size?
If you want to print to your custom paper size, you can custom in your java code(Paper Class or findMediaSize() method), but if the custom size does not in the standard paper sizes, Printer API will select the nearly paper size from standard sets(height must more than width forever).
According above, it can't completely when your paper isn't in standard size sets. You can do this to add your paper size to standard sets
in this case my OS is Windows XP
goto -> Printers and Faxes -> File -> Server Properties (in this dialog you can add your paper)

After you do that, the Printer API will see your paper in standard sets but paper height must more than width forever.

5 comments:

Unknown said...

Hi,
I have a requirement to set the custom paper size to the printer through my java program can you please help me out with this, cos i am facing the similar problem of java consider the nearest paper size for printing

Anonymous said...

Good fill someone in on and this post helped me alot in my college assignement. Gratefulness you as your information.

Anonymous said...

I've same problem :(

Awanish said...

Thanks, i was facing this problem from few days. It help Me...!!

Android app developers said...

This is one of the specific post.I like your blog reviews.Thanks for your support.good.