| | |
Double-Sided
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
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:
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
I know that it is also possible to print double side page by adding attributes to the PrintRequestAttributeSet class by using the below line
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
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:
Java Syntax (Toggle Plain Text)
print(graphics, pageFormat, 0) print(graphics, pageFormat, 1) 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
Java Syntax (Toggle Plain Text)
print(graphics, pageFormat, 0) print(graphics, pageFormat, 2) 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
Java Syntax (Toggle Plain Text)
.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
![]() |
Similar Threads
- Help required with double-sided ram (Motherboards, CPUs and RAM)
- Adding RAM to HP Pavillion 8776C - odd problems? (Motherboards, CPUs and RAM)
- i got this new RAM (Motherboards, CPUs and RAM)
- Video link (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: find a specific directory
- Next Thread: Dispacher...need help
| Thread Tools | Search this Thread |
3d @param affinetransform android api applet application arc arguments array arrays automation binary bluetooth byte capture chat chatprogramusingobjects class classes click client code color compare component count database design detection eclipse eclipsedevelopment encryption error exception fractal game givemetehcodez graphics gridlayout gui guitesting helpwithhomework html ide if_statement image input integer interface j2me java java.xls javaprojects jni jpanel julia keytool keyword linux list loop macintosh map method methods mobile netbeans newbie object os pong print problem producer program programming project projectideas read recursion replaysolutions rim scanner screen server set size sms sort sql string swing terminal threads transforms tree ui web windows





