I am trying to develop application to print text file from java, on linux. I have paginated the text file and have formed object of Book class. Then I have used job_ = PrinterJob.getPrinterJob(); job_.setPrintService(selectedService_); job_.setPageable(pages_); //pages object of Book class job_.print(aset_); //aset_ object of PrintRequestAttributeSet This is working on Linux advanced server 4 but not on Linux advanced server 3.
Can anyone help me to find out what can be the problem???
Not working could mean: - compile errors (which?) (I' don't think so.) - Exceptions at runtime (which?) - garbage output - silently ignored (do the printlogs tell you something?) - something I didn't thought about.
not working means its not printing any data from the file. on Linux advanced server 4 the file is properly printed, but on Linux advanced server 3 the printer just skips pages. i.e. if I try to print 3 pages it skips 3 blank pages and doesn't print anything
Don't you have to do a start and end page operation?
Or was that some other programming environment? I'm too lazy to RTFM.
I know in some platforms, failing to bracket page print requests can cause nothing to print, or have it all come out all overlaid on the last page.
Customer surveys are for companies who didn't pay proper attention to begin with.
juilee rawale
Greenhorn
Joined: Aug 31, 2005
Posts: 7
posted
0
I have paginated the file and formed object of class Book pages_. pages_ contains Printable i.e. objects of class implementing Printable interface. If I want to print 1-3 pages I paginate the file and append 1-3 pages to pages_. After this I have used
i.e. pages_ contains all those pages which I want to print. In case of Linux advanced server 4 all these pages get printed, but in case of Linux advanced server 3 printer just skips blank pages. If there are 3 pages to print it will skip 3 blank pages!!!
Do you use cups on both machines? Did you have a look at the logfiles? /var/log/cups* might be a starting point. It might be a different location on your machine.