• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

support for java.awt package on Linux

 
juilee rawale
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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???
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
juilee rawale
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

plz help me to find the reason

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
juilee rawale
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

job_ = PrinterJob.getPrinterJob();
job_.setPrintService(selectedService_);
job_.setPageable(pages_);
job_.print(aset_);

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!!!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic