Client Side Component

A

Ambush

I am currently working on one of those projects that we all dread. The
type that keeps growing out of scope faster than you can finish the
component to deliver what they've already asked for. Including maybe,
needing to develop things in languages / ways that you have never
developed before. That precursor out of the way, here's my situation.

My client is reshipping things via UPS. We have an interface to the
UPS API which will return to us, in the end, a label in .epl2 format.
What the client wants now, is to print the label on the thermal printer
at the clients site. In the case of .gif labels, we just create a
standard HTML page and send that off to the printer. EPL2 labels are
in RAW format, so it isn't quite that easy. They have stated that it
is acceptable to have users install an OCX/DLL on their client machine
to achieve label printing, but no thick-clients.

I have designed an ActiveX control in VB6 that downloads the file(s)
from the server and sends the RAW print data to the printer. This code
works just fine when called server-side (therefore it prints on the
servers thermal printer). However, I need the page/control to print on
the client's thermal printer. I've not seen much in the way of
documentation on the net, and what I can find doesn't seem to work for
me. At this point, my calling page no longer generates an error, it
simply does not work. I'm sure (and I hope) that it's something stupid
that I'm doing, but...

Anyways, to fill in a bit more detail, the ActiveX control takes a URL
parameter (defines the location to download from) and a GetControl
parameter (tells the control whether or not to also download a
controllog file from the server as well). The control figures out
which printer it needs to print to.

Here's how I'm -trying- to call it now (I've hardcoded values to ensure
that my passing of variable is not the issue):
<html>
<head>
<script language="vbscript">
sub clickme()
dim myPrint
myPrint=createobject("WebPrintControl.Printer")
myPrint.URL =
cstr("http://localhost/TrackASPx/Labels/label1Z1Y303E5992464423.epl2")
myPrint.GetControl = cint(1)
myPrint.PrintFile
end sub
</script>
</head>
<body onload="clickme();"></body>
</html>

Please someone, help me out so I can dig myself out from this project!!!
 
M

Mark Schupp

Most likely there is a security issue with the component accessing the
printer from inside the web-browser. Have you verified in the component that
the file is retrieved by the component?

You should follow this up in a client-side component group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,734
Latest member
manin

Latest Threads

Top