File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Printing with 300dpi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Printing with 300dpi" Watch "Printing with 300dpi" New topic

Printing with 300dpi

Manuel Stoehr

Joined: Feb 06, 2009
Posts: 1
Iam very new to printing in Java.
My problem is to print a JPEG with 300dpi to a Label-Printer with also 300dpi
When the Image is printet, its much more larger then the File, the Resolution is
only 72dpi.
How can i increas the Resolution to print with full 300dpi ?

Here my Code:

has anyone experience with printing more then 72dpi in java ?

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

Try using


Ujjwal B Soni

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Kunal Sapru

Joined: Jul 08, 2010
Posts: 9

I'm also having the same problem. I'm using TSC-TTP-244 Plus barcode thermal printer and its resolution is 203 dpi.

I tried both the codes. In the first one a very small image is being printed spanning over 3 ribbon labels....

I also updated the code with the 2nd block and got the following exception:

Exception in thread "main" java.lang.RuntimeException: No printer services available.
at com.halo.struts.action.PrintImage.main(

Thanks & Regards,
Kunal Sapru

I agree. Here's the link:
subject: Printing with 300dpi
jQuery in Action, 3rd edition