Home arrow static arrow Java Programming [Archive] - Printing in Java in inches
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Printing in Java in inches
This topic has 5 replies on 1 page.

Posts:270
Registered: 20/1/04
Printing in Java in inches  
Jun 27, 2004 7:53 AM



 
Requirement


I want to fill up the columns in a Specified legal form through Printer
The legal form has some columns specified for certain fields and so I will print the form through values kept in my database

The database part is not a problem

I am just finding out ways by which I can print the Document by giving them a measurement i.e. centimeters/inches or anything like that as I will see the inches and print it accordingly

Can anyone provide me an example of that

Thanks in advance

CSJakharia
 

Posts:8,813
Registered: 10/4/00
Re: Printing in Java in inches  
Jun 27, 2004 8:01 AM (reply 1 of 5)



 
If the printer prints at 300 dpi and your form is 900 by 600 pixels, it will print 3 inches by 2 inches.
 

Posts:270
Registered: 20/1/04
Re: Printing in Java in inches  
Jun 27, 2004 8:54 AM (reply 2 of 5)



 
The legal Form about which i m saying is in Paper format and not electronic format

I mean we have a Legal Form in Paper format and therefore I have to fill the columns provided for filling that form and So i require an example that will allow me to print in that particular location

Thanks in advance

CSJakharia
 

Posts:8,813
Registered: 10/4/00
Re: Printing in Java in inches  
Jun 27, 2004 9:10 AM (reply 3 of 5)



 
look at this thread
http://forum.java.sun.com/thread.jsp?forum=54&thread=525875

You are going to need to know the resolution of the printer. If it changes, the text will move.
 

Posts:130
Registered: 8/28/00
Re: Printing in Java in inches  
Jun 28, 2004 8:44 AM (reply 4 of 5)



 
You might want to look at a page-layout library such as fop or itext to handle this sort of thing.
 

Posts:270
Registered: 20/1/04
Re: Printing in Java in inches  
Jun 28, 2004 10:51 AM (reply 5 of 5)



 
Yes I want an API call in such a way that If I want to print at a particular inch of the page It should print at that particular point

I mean it will do if I don't show the user the preview but I require the ability to give the user option to select the inch/cms of page where the user wants to print a particular text

Thanks in advance

CSJakharia
 
This topic has 5 replies on 1 page.