I need to develop a small delphi app that prints stickers (text + graphics) to label printer such as DYMO one by one.
What is best way to do this, is there e.g. some custom API for DYMO printers or how to print color graphics to small stickers?
The label printer may have a normal Windows printer driver.
If that is the case you can print simply with something like this:
Printer.BeginDoc;
Printer.Canvas.TextOut(10, 10, 'Hello label');
Printer.EndDoc;
Have a look on this dymo.com page for a Dymo SDK you can download.
We've been printing to Zebra label printers for years through standard printing functionality. We actually create a report (QuickReport) and send it to the printer using the basic Print command.
The ability to print color is going to depend on the facilities of your printer. For example, the Zebra printers that we use are thermal transfer ribbon printers which means that there is only one color possible.
I've used plain old Printer.Canvas from the Printers unit to write to DYMO label printers, with labels printing OK.
As Scott W suggested using the Windows printer drivers, is the easiest way to output labels to a printer, and your software can be used with other label printers.
You just need to create a page with the correct label size, using QuickReports, Rave or any other reporting components.
You can download drivers from DYMO direct. For other label printers I would highly recommend using drivers from Seagull Scientific. There drivers are better than those supplied by the printer manufacturer.
Related
I want to know if thermal printers work with quickreports designed with delphi 7 before I buy one. I have designed a program that generates a receipt like quickreport but I am not sure whether it will work with an e-pos T220 thermal printer before I buy one. Has anyone used thermal printers with quick reports?
Yes, QuickReports supports thermal printers. Our own software supports exactly this and has been from Delphi versions 4 through XE7 (although I personally have not worked with QR).
This includes both barcode/label printers and receipt printers. The general rule of thumb is, if you can print to a printer from Microsoft Word, then you can print to that printer using QuickReports.
If I recall, if you want to use quality font rendering, you have to choose from a limited set of system fonts, as supported by the printer. You can still use other fonts, but the quality of other fonts isn't guaranteed.
You can also print images, although they are in black/white.
What i want is
Design a label layout(barcode on it).
Scan the information by handheld and print the label directly from mobile printer linked with bluetooth.
want to know:
best way to implement this? see my preferences list below
1) free of charge
2) the API should have 2D barcode support
3) label layout can be designed by Drag-and-drop. The best is a visual studio control. so we do not need too much coding.
Hope someone has experience can share some to me, what cotrol? what liberary? Must use zebra specific printing language?
Kindly show a technique chain of the best(easy, free). Thank you all.
You should try and go with the Zebra SDK (for windows ce too). I assume there is no drag and drop GUI designer tool. But you may examine the code generated by a label designer application printing to a zebra printer using file: as output port.
Zebra provides good SDKs, samples and support. For example to print a QR code:
^XA^FO100,100^BQN,2,10^FDYourTextHere^FS^XZ
You see, it is more or less readable where to replace text to get another QR barcode.
see also https://km.zebra.com/kb/index?page=content&channel=SAMPLE_CODE
You may need to study the ZPL programmers guide and then you can start to print your own mind-designed labels. Printing meeans to send ZPL code lines directly to the printer.
I would like to use POS with my custom printer. So the form of the bill /invoice is formated for a small printer. I would like to print on normal A4 paper. how can I edit the settings of the outgoing printing in POS?
Usually POS requires COM device to print. You should read the printer programming manual to see how to call the command. If USB, you should use the vendor's USB library.
My first application I have developed in RoR is for some Kiosk Touchscreen PCs used in our stock. When the stock worker picked up some material he enters the quantity in a Form.
Now I want to print a label containing: customer name, material description, quantity, and a barcode on our Zebra printer.
How would I do that from a Ruby on Rails Application ?
Sending directly the control chars needed for ZPL (Zebra Printer Language) from the controller ? ( not very comfortable )
Create a view in HTML send it to the client, and the client has to print it. ( not very confortable and error prone, as the stock worker has to do additional steps, may choose the wrong printer or maybe don't print the label at all )
Create a pdf document from the controller and send it to the printer from the server ( oh, no the printer does not understand pdf, so I have to control a pdf reader to do the printing ?? That wouldn't be very fast as it will send the label as a graphic image to the printer
Create a gem which will hide all the logic needed for printing ? ( Are there any gems which already do this ? )
I would appreciate every comment.
Thanks
Klaus
I would send the raw ZPL to the printer. You can use a tool like Bartender (I would suggest installing Bartender Only from that link. You can basically design your label in this tool. After you've designed your label you would download the bartender printer drivers for your zebra printer and set up a dummy printer with these drivers and print this label you designed to a file. This will give you the raw zpl. From this you can basically substitute all the dynamic data into the zpl file you printed in the previous step and send this directly to the printer via serial, tcp/ip or usb.
Edit: I found a much better solution as I continued to dig on this. This is pretty significantly edited down to focus on the Java applet solution I ended up using.
Basically, you will generate the label as raw ZPL text. You then need to get that plain text to the printer, which will generate the label.
If your server can access the printer's IP address, you can copy the ZPL to the printer directly from the server process. If it's a remote web app, you need to get the client to send the ZPL for you. Browser sandboxing makes this hard to pull off - drivers want to helpfully get in the way. There are a few options; the most common is to use a small Java or Flash applet to do the actual copying. If you can get the specific web browser your users are using to print to a plain text printer without adding anything, you could use local printing, but generally the most robust approach is to use a helper Java applet.
The Java applet I use for this is jZebra: http://code.google.com/p/jzebra/
It's a very clean & straightforward approach, look at the sample HTML in the download package and a few lines of code print the label. I just edited down the sample and am planning to use it as my production code popup.. it's really that straightforward.
Two caveats with this approach:
Your users must have the JRE installed
jZebra finds the Zebra printer by printer name. There are very specific guides (they have detailed instructions for Mac, Windows, and Linux setup) for what you need to do - but it's well documented and you just have to have your users follow the instructions. Once it's set up correctly it works great.
More simple solution, and I believe better as well, Usually most of browser and machines has PDF viewer installed. So just create labels as PDF documents and sent it to browser.
We have implemented label printing using Zebra printer in ROR following way.
Create exact format label pages in html.
Convert the html to pdf using wickedPDF.
Usually labels contains barcodes as well.
So overall solution would be,
Create barcodes using barbie gem.
Create html using barcodes and your actuall data that needs to go on label.
Convert html view to PDF.
Sounds like a job for a ruby C extension. Perhaps one that also wraps something like gnu barcode http://www.gnu.org/software/barcode/ library and some other open standard for the zebra printer, if one exists? I once did a rails app that made coupons and made heavy use of gnu barcode, but I did simple shell command to interface to it.
I have a client asking if their web application (PHP) can easily print to a UPS / Fedex thermal label printer.
So for instance, I can get back a PDF from UPS/Fedex with the shipping label. I just need to print that.
Does anyone know if you can print directly to these printers or, if not, if there's another way to do it?
EDIT: To clarify, all I want to accomplish is to be able to print to these printers, without having to make my client ALT-TAB to some third-party application like UPS Worldship or ShipRush or QuickBooks Shipping Manager and clicking 'Print' within that application. Do-able?
Getting the labels in correct format
The FedEx & UPS APIs provide options to get thermal label specific types. You will beat your head on the keyboard trying to get PDFs to print properly on thermal printers.
Some common thermal types EPL/EPL2, ZPL/ZPLII. Most thermal printers will accept documents matching one of these types.
For Fedex something like this in your ShipRequest - This is using the FedEx WSDL for shipping.
RequestedShipment.LabelSpecification.ImageType = FedExShipService.LabelSpecificationImageType.ZPLII
And UPS - Building XML to post to the UPS service.
<LabelSpecification>
<LabelPrintMethod>
EPL2
</LabelPrintMethod>
</LabelSpecification>
Printing the labels
You will need to essentially send "raw" data to the printer. I started with this article and adopted it to my solution. FedEx for example returns a byte array which contains the label information - I convert this to a string and then send to the printer.
'Convert from Byte Array to String
Dim enc As System.Text.ASCIIEncoding = New System.Text.ASCIIEncoding()
Dim strConverter As String = enc.GetString(<ByteArrayFromFedEx>)
http://www.paulaspinall.com/post/2008/05/31/Sending-data-direct-to-a-printer.aspx
There is also another thread on SO about this topic.
Sending raw data to FedEx Label printer
I used to work on UPS shipping systems and yes you can print using the thermal printers. You need the correct drivers installed to do this. Depending how you want to print will also determine how you need to install the printer (local or shared printer). HTH
Your best source of information on how to print will come from the printer manufacturors web sites. I have referred to this article in the past when developing solutions for customers that consume the UPS API's.
Sending Raw EPL2 Directly to a Zebra LP2844 via C#".
This blog post goes into good detail about printing labels from code. Dn't be scared off because it has C# in it's title.
The manufacturers do an okay job of providing the information you need.
Shiprush has an api you can use to generate labels from code. It is pretty flexible, and can either send the label to a printer or return the label to your code for you to handle.
This open source applet would allow you to print from PHP. I personally stay away from Java but it may do the trick.
http://code.google.com/p/jzebra/
You will not be able to print the carrier PDF to the device, however you can take the raw EPL/ZPL code from the carrier and have that sent to the printer.
There is an ActiveX control from UPS that you can install. If you return the EPL stream with a MIME type of application/epl2 the ActiveX control will take the data and send it to the thermal printer.
Google "ups thermal activex"