Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 6th, 2005, 7:02 AM   #1
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
Question printing 1 or 2 pages and not 9999

how do i get rid of that annoying 9999 pages that will be printed once i hit print? i also want to print 2 or so pages of stuff, but it's still putting everything on one page and then it doesn't fit. does it have something to do with PageFormat? i've taken a stroll through the web in search of a cure, but haven't found one (that i understand) yet.

anyone want to give me clues? i don't want the code, i just want to know what to use and so on. i want to sort of figure most of it out myself.

thanks guys.

ps : if you don't know what i'm nattering on about, then there is a screenshot attached where i circled the 9999 bit.
Attached Images
File Type: gif printing.GIF (15.6 KB, 55 views)
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Old Jun 10th, 2005, 9:41 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
where are you hitting print from?
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jun 10th, 2005, 11:44 AM   #3
Knight
Newbie
 
Join Date: Jun 2005
Posts: 28
Rep Power: 0 Knight is on a distinguished road
Are you just trying to print like normal? Just change the (9999) to (2) or whatever you would like. If I completely missed what you're asking for, forgive me
Knight is offline   Reply With Quote
Old Jun 13th, 2005, 1:54 AM   #4
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
i do the whole
if ( pj.printDialog() )// javax.print.attribute.standard.PageRanges( 1, pages )) )
{
	pj.print();
}

thing, but as soon as i have more than a page to print, then it doesn't want to do the next bit on the second page. i was told that users are losers and if there are 9999 pages selected, then odds are good that they will ignore it and then have a hernia when the printer prints a page and then spits out 9998 blank pages.

if you can have 60 lines of data, and only 40 fit on a page, how will you change the 9999 to a 2 and also, how do you get those last 20 lines on the second page?
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Old Jun 13th, 2005, 8:42 AM   #5
Pilgrim
Newbie
 
Join Date: Jun 2005
Posts: 11
Rep Power: 0 Pilgrim is on a distinguished road
Ok, here are two resources I found on printing in Java.

The first is a multi-step tutorial on printing in Java.
http://www.javaworld.com/javaworld/j...020-print.html

The second is a page from Sun about advanced printing. It includes printing in multiple pages and if your data is larger than one page.
http://java.sun.com/developer/online.../advprint.html

I hope these are somewhat helpful to you. If I find more info, I'll let you know.
Pilgrim is offline   Reply With Quote
Old Jun 14th, 2005, 4:48 AM   #6
Easter Bunny
Programmer
 
Easter Bunny's Avatar
 
Join Date: Mar 2005
Location: different places. constantly on the run.
Posts: 57
Rep Power: 4 Easter Bunny is on a distinguished road
thanks dude. will check it out when i'm on lunch(assuming the customres let me have lunch). will let you know if i got it.

thanks again.
__________________
There's got to be more to life than being really, really
ridiculously good looking
Easter Bunny is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC