d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Printing
Add Reply New Topic New Poll
Member
Posts: 8,635
Joined: Dec 28 2007
Gold: 87.00
Jun 6 2012 12:53pm
I would like to print pictures from my application in 2 different size (user picks either of sizes) the sizes I want are A4 (210×297mm in paper) and 4R (102 × 152 mm in paper). If there is multiple pictures selected for printing and 4R size is selected I would also be able to print 2 of those / page (I think I can figure this out myself after getting the printing ratios correct).

I'm using this example to print: http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Demonstratesprintingimages.htm

But how I can set the picture size so it will be either of my wanted sizes in paper? And will it differ in different printers/computers? This is first time I'm doing printing myself.

Is this example even good for my purpose? And if not, could you suggest something better?

Thanks.
Member
Posts: 8,635
Joined: Dec 28 2007
Gold: 87.00
Jun 7 2012 09:38am
I think that only problem now is to get correct pixel / ppi ratio as I have figured out everything else. Is there any easy way to work what pixel size do I need if I know printer ppi and size in mm I want in paper?

This post was edited by vittujenkevat on Jun 7 2012 09:44am
Member
Posts: 67
Joined: Jun 9 2012
Gold: 1.12
Jun 9 2012 01:33pm
Please post the code here so we can take a look at what you have.
Member
Posts: 8,635
Joined: Dec 28 2007
Gold: 87.00
Jun 10 2012 10:00am
Got it working now.
Member
Posts: 17,233
Joined: May 31 2007
Gold: 0.00
Jun 10 2012 03:09pm
Quote (vittujenkevat @ Jun 10 2012 11:00am)
Got it working now.


:thumbsup:
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll