Double-Sided

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Double-Sided

 
0
  #1
Feb 1st, 2005
Hi everyone,

I am currently trying to print a swing component a JTable to be exact but the thing is that i want my user to be able to print even, odd or all the pages. The thing is i am using the swing print dialog and not the windows native one.

When i write i use the printer job the java printing system will call the page indexes as follows:

  1.  
  2. print(graphics, pageFormat, 0)
  3. print(graphics, pageFormat, 1)
  4. print(graphics, pageFormat, 2)

As you can see from above all the page numbers are called sequentially until NO_SUCH_PAGE is returned.

Well what i am trying to say is that is possible to make the java printing system only call odd page indexes
something like this

  1.  
  2. print(graphics, pageFormat, 0)
  3. print(graphics, pageFormat, 2)
  4. print(graphics, pageFormat, 4)

I know that it is also possible to print double side page by adding attributes to the PrintRequestAttributeSet class by using the below line

  1.  
  2. .add(Sides.DUPLEX)

This is not a very good option as it requires an expensive printer for this and not many users have this type of expensive printer.

I hope i haven't confused you guys and maybe someone can explain or guide me to a way to printing even and odd pages.

Please note that the JTable is three pages long

Thank You

Yours Sincerely

Richard West
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC