I was curious as to whether anyone had set up a WebPort protocol so that when they register new compounds, they have the option to print barcodes.
I was curious as to whether anyone had set up a WebPort protocol so that when they register new compounds, they have the option to print barcodes.
There are off-the-shelf barcode printing software packages that can provide a web service or a web service-like capability for printing labels.
This makes it easy to create a component that "prints a barcode label".
Take in information -> format as needed -> send to print server -> done.
This project got bumped down due to business requirements, otherwise, I'd post up a component that I have.
MK
Not sure if this is exactly what you're looking for, but you might want to check out the UPC Barcode example protocol in the Reporting Collection. It demonstrates how to generate barcodes through an implementation of two common barcode algorithms, and using the Canvas components.
Cheers,
Andrew
I suppose a little clarification is necessary. We have a Zebra (?) barcode printer.. and the chemists would like to be able to press a button that would auto print a barcode upon registration. We already have a registration system setup via WebPort... they just want this added functionality.
For one-click functionality, your best bet is to have a Protocol Function called which will run the protocol to print the barcode. How you actually do this depends on the printer. I have worked with a CAB label printer in the past where we printed labels using a SOAP call. Another option that the printer may support would be to upload a file that gets printed. In this instance, you would pre-create the label using the Canvas or other components, save it as a PDF or image, and upload it to the printer to be printed.
If what you're looking for is to print from your protocol similar to how you would print a Word document (with the print optiosn screen and everything), then unfortunately I don't believe that is currently possible. Your best option in this case would be to create the label and save it as a PDF and then print from the PDF viewer. It is a few extra clicks for the scientist, but is probably the simplest and easiest to implement without knowning more about the printer itself.
I've actually got pretty much the same request - would like to be able to hit a button in the webport and have the barcode printed from our printer (Brady LabXpert).
At the moment I'm resigned to a system similar to that described by Ian:
There is already as template exisiting in the printer software
The user clicks on a button in the webport - this runs a protocol that generates a file containing the contents of the label(s) (including the text that will be represented as a barcode)
User points the template towards this PP-generated file.
User hits print.
Not as slick as I'd like but does work - would love to get something better via SOAP/printer servers but haven't got the expertise to impelment it (way down the list of priorities )
Thanks for all the feedback guys, I've got a few ideas on how to go about this now. Unfortunately, this too is also low priority for me.
Question to all:
1) Are you trying to print a barcode within a document? (eg Word or PDF)
2) Or are you trying to print a label with a barcode that will be placed on a vial or assay plate?
If #2, I finally got mine to work. see the attached component. (caution: it may need some more work)
I'm following the same method that big inventory managment systems (eg SAP) use to print labels.
The component creates an XML document from all data records then sends it to the label printing service.
The label printing service software I am using is a software package from Seagull Scientific called "BarTender Enterprise Automation". Their 3-printer license is fairly cheap {MFG# BT-EA3}
It is a very powerful software package that includes a WYSIWYG application for designing the labels. It also can do 2D barcodes and RFID encoding... if you like {I haven't messed with RFID, yet.}
The XML document and Commander configuration (name of the label printing service application that comes with BarTender) are based on Seagull's Oracle integration white paper. Read that for setting up the print service. The component just makes and sends the request.
note: the component sends the request AFTER all data records have been processed. (ie the request is sent as part of the "Final Expression")
note: it doesn't fail data records that don't have all properties listed like I wrote in the help-doc.
I'm open to any suggestions for improvement.
MK
Definitely not #1. The request wasn't altogether very clear. It was, can you make it so that when we're done registering compounds, we can press a button to print barcodes. It is not a word/pdf document. The printer has a template? We're using a Zebra label printer. I really need to figure out what exactly that darn printer does. >.<
If this component works with whatever specs the Zebra printer has, I'll be a happy camper.
The component works with the BarTender software.
The BarTender software works with Zebra, CAB, IBM, 3M, Toshiba and a whole list of others including my Intermec that only has an RS-232 port.
For best results, you install the Seagull Scientific print drivers for your printer. BarTender then prints the labels through that.
This totally by-passes needing to set up "printer templates" within the printer.
Which makes it nice when you get another/newer/different make printer.
It also makes it nice when you have a printer that doesn't have that capability (eg my Intermec).
The most difficult thing is setting up the "print stock" information between the printer and BarTender software.
MK
Hi,
This might be of interest - I have now got a system where the user swipes their barcoded vial and a label containing details of the contents of that vial is printed. No mouse clicks required - I'm a happy camper
It turns out that with our label printer - you can send anything to it and it will try and print it - so we're not constrained to using the software that came with it. If I wanted I could type something out in Notepad, hit print, seleect the printer and that text would print out on the label. If you find you can do the same with your own label printer then this system should work for you too. You'll need to experiment to work out what font size and max characters you can use on your label and set your printer up as the default printer for your PC (if no mouse clicks are desired).
If you want instant printing without mouse clicks this is possible using Firefox and changing a setting so that you don't get prompted with the print dialogue screen. This is a custom setting which isn't widely advertised as scurrilous websites could use it to force print lots of stuff so make sure you're aware of the risks. Go online and google "Firefox silent printing" for numerous examples.
Once the barcode is entered into a textbox in the webport I've some javscript to trigger off a protocol function that pulls out all the details for that vial from our database - the info is piped into a suitable reporting format with the settings adjusted to suit the label (font size = 4 etc). The protocol function is using the callback functionality so that on completion of the protocol another js function is triggered that opens up a new browser window/tab - this is populated by the results file of the previous protocol so only the label contents are shown. Javascript triggers a print command "window.print()"which prints the window. The entire browser window is printed which is why I needed the label contents in their own window rather than within the webport which has lots of other content that would have been printed.
A futher bit of java closes down the newly created window "window.close()" after the print function so that user never actually sees it appear.
If I hear any interest I'll try and put the bits together into a nice example protocol and zip it here.
Thanks to Pedro and Craig who helped find bits to put it all together.
Tris
If it is dangerous, then don't use it.
Lessons from "the school of hard knocks" : My team wrote a PERL/CGI application that took advantage of a "security hole" in Internet Explorer.
Now, not only are we stuck on IE, we are stuck on IE version <= 7.
Caveat Emptor
I agree with Mike on this matter, but would still be interested in seeing your setup.
I completely understand and take that message on board - clearly you don't want to cripple your system either by leaving vulnerable to the outside or by making it dependent on applications that could become obsolete / unsupported.
There are ways to make this protocol "safer". FF add-ons exist through which you could adjust the FF configuration via javascript to prior to sending the print command and then post event, return the configuration settings back to safer default settings. It falls to the developer themselves to decide on the risk/benefit and both security and business rules should be part of that equation.
Attached in the zip are two protocols which demonstrate the set up. BarcodePrintDemo is the front-end - what the user would see and interact with. The other protocol is the one doing the back-end work, querying the user entered data against a dataset and reporting the results in two formats - one for on-screen visualisation, the other for entry onto a label. The result file generated by the label protocol contains java script which triggers a print event as soon as the file opens in the browser. That in turn will bring up the printer dialogue box - once the print command is confirmed then the window shuts down.
I was lazy and didn't bother hooking this to any real database / data file so you're valid entries as dummy barcodes are limited to "123" or "456".
As mentioned in my previous post you'd have to know that your label printer was capable of accepting data without going through whatever software might have been supplied with it.
Also going back to the original thread I think the request was to actually print a barcode on a label - we don't need this facility and as such there's nothing in here that will actually construct the barcode but I think other answers have suggested how this could be achieved with canvas components etc - what this does demonstrate is a way to print whatever content you'd like onto a label with a minimal number of mouse clicks by an end-user.
T
So I'm starting to get bugged to work on this. Does BarTender work on linux servers?
-J
The component I posted uses straight TCP/IP communications and works on PLP on Linux.
The BarTender software is MS Windows only. However, BarTender has very very low requirements. (minimum XP sp2)
We have it running in a VM.