Forum: Ruby on Rails UPS shipping labels in EPL format?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jenifer L. (Guest)
on 2008-11-17 23:14
I'm using the UPS Shipping Tools to generate shipping labels... I'm able
to successfully generate the label data (and I'm able to print the
labels in GIF format), but I'm wondering how I could save EPL formatted
label data, so a thermal printer (UPS Thermal 2844 from Zebra) can use
it?  I tried saving the raw data in a text file and printing it, but
that failed. I've also contacted UPS tech support, but they haven't been
really helpful.  Does anyone have any insight on this or point me in the
right direction?
Matt H. (Guest)
on 2008-12-16 00:32
Jenifer Louie wrote:
> I'm using the UPS Shipping Tools to generate shipping labels... I'm able
> to successfully generate the label data (and I'm able to print the
> labels in GIF format), but I'm wondering how I could save EPL formatted
> label data, so a thermal printer (UPS Thermal 2844 from Zebra) can use
> it?  I tried saving the raw data in a text file and printing it, but
> that failed. I've also contacted UPS tech support, but they haven't been
> really helpful.  Does anyone have any insight on this or point me in the
> right direction?

Sorry to bump a fairly old thread.  I was searching for a slightly
different question and saw this post, which I might be able to help
with.

If you are planning to have the label printed at the client computer,
and it is running Windows, UPS provides a plugin for FF and IE that will
immediately print a label fed to it by the server, no questions asked.
(Secure, I know.)  The way they've used it on the UPS site is within
embed tags.  Since the plugin doesn't display anything, you'll want a
HTML response with that embed tag in it, rather than sending the EPL
data alone as a response.

<embed src="------" type="application/epl2"></embed>

The UPS EPL plugin can be found at http://tinyurl.com/6mpohy


If the client may be running Linux, you can make a script that can be
associated with EPL files, which simply opens the serial device and
sends the EPL data as is.  If you'll be printing labels at the server,
and it's Linux, you'll do it about the same way, but printing through
lpr with an unfiltered/raw device would be a bit smarter there.

If you want to print labels at the server and it's a Windows server,
you'll need to open "LPT1:", "COM1:", or "USB001:" as appropriate and
feed the EPL data there.

Hope this is helpful to you or anyone else searching on the subject!


--
Matt H. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.