# Print to a label printer directly

**URL:** <https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833>\
**Category:** Ruby\
**Created:** [March 26, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833 "2010-03-26T20:57:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandrade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mandrade](https://www.ruby-forum.com/u/mandrade)\
**Post date:** [March 26, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833/1 "2010-03-26T20:57:13Z")

</div>

Hello all,  
I’m wondering what would be the best method to print to a label printer?  
I  
need to print many labels from a rails application, and I need to do it  
on a  
windows box (until we get a linux server up and running). It’s been  
horrid  
so far, the printer doesn’t seem to want to respond to commands like  
system(“print /d:\name\printer file\_to\_print”) or even the command  
itself  
run in the command line (applications like notepad print out their  
contents  
fine, though). Is there a better way?

Mario

---

<div class="post-metadata">

**Author:** ![mandrade](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mandrade](https://www.ruby-forum.com/u/mandrade)\
**Post date:** [March 28, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833/2 "2010-03-28T22:28:10Z")

</div>

Java has a pretty good set of printing APIs that I have use in the  
past for everything from PDF to plain text. Perhaps you could use  
JRuby to do it?
