This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Doubt on Java Print API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Doubt on Java Print API" Watch "Doubt on Java Print API" New topic

Doubt on Java Print API

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9951


I'm quite unsure as to why the following program returns an array length of 0 for the PrintServiceLookup??

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
David Sharpe
Ranch Hand

Joined: Jun 15, 2009
Posts: 36
I've never used javax.print, and so my post is more for learning than helping, sorry.

I see the API says "If no services match, the array is zero-length." Where does it look for these services? Does lookupDefaultPrintService return anything?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Doubt on Java Print API
It's not a secret anymore!