• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Printing API Question

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi - I have a file coded in the native command language of the printer I need to print to. Its an Intermec Barcode printer and the file I have is in IPL language with all necessary data populated to print a barcode on the printer. I have this in file format bu of course can also get this as a string.

I want to send this string directly to the printer, i.e. as text direct to the printer. The printer is installed in Windows as a Generic/Text printer. When I use the print API, it forces me to define this as a type the printer supports, closest I can see is image/gif and then when I do this, the label does not print.

The data is correct because I can open a command prompt and type copy/b <filename> <printer> and it works fine.

Is what I am tying to do possible using the Java Print API? It seems like this forces the user into a series of steps defining document flavors other than just "printer command text", etc which I dont know but suspect is messing with my data prior to sending it. Is it possible to open a direct socket connection to a printer? Or do I have to use RunTime.exec and the copy command?

Any help would be greatly appreciated
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic