The Artima Developer Community
Sponsored Link

Java Buzz Forum
The World of Java printing

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
The World of Java printing Posted: Jul 20, 2004 5:58 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: The World of Java printing
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Marc's Java Blog

Advertisement

6 hours of real fun today and no coding at all, just plain research work. I am involved in some project which requires printing from a java server application. Buf before digging into java, i checked the printer manufacturers site what the Ethernet-Printserver is capable of, the list was quite impressive:

Print Protocols and Methods (all simultaneously active):
TCP/IP: LPR/LPD, Telnet, FTP, IPP v1.0, Raw printer port (port 9100)

BTW we are speaking of a thermal direct printer from a company called Zebra, i will come to this later on..

Not being the printer guy, i checked most of the protocols to see how they integrate into java. FTP is of course one of the easiest things to integrate, but the resulting software should be responsive, i dont think FTP is the best way to do application-printer communciation. Telnet is an even more obscure choice, so i trashed that option instantly. Raw printer port seems to be an option when you want to play around with sockets, its a choice, but if you want support more printers in the future, this is not the best one. The remaining two are quite interessting: LPR/LPD is widely used and is available on all platforms but the same goes for IPP, with the advantage of IPP to be even more standardized and with better tunneling capabilties.

So to me, LPR or IPP are good choices and i will see later on how its going. As we all know, printing has been a cruel story in the java world for many years, with 1.4 we got the new "Java Printing System" API. But Sun seemed to have forgotten to include an IPPPrinterServiceLocator in the J2SE, after an extensive search i found this:

https://sourceforge.net/projects/jipsi/

Have not tried it yet, but it seems to solve my problem. When using LPR, the default discovery service should locate the printer, but this is also a wild guess, as so many others are wildguessing when it comes to printing from within java.
Another quite interessting resource in the LPR/LPD area was this one:

http://lpdspooler.sourceforge.net/

Given the case i can finally send data to the various network printers, one would say that most of the work is done. But i have to submit a totally proprietary printer language called EPL2 - Eltron Programming Language. Eltron was the former companyname of zebra (or they aquired eltron - dont know). With EPL2 you submit an ASCII file with various control codes to print barcodes or other stuff which you cant express via ASCII ;-) But i think even its proprietary, this is easier than the communication handling.

Soon i will get a test device, then i will transfer this research knowledge into real life, i will write a follow up on this blog then...

Read: The World of Java printing

Topic: Gridbag bad! Previous Topic   Next Topic Topic: [Jul 13, 2004 04:03 PDT] 15 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use