Rectangle 27 2

For those people who need to know how to actually print this file, the data is in Citizen PRN format and can be sent to the printer directly by using the Windows COPY command.

COPY /B C:\FILENAME.PRN \\ComputerName\PrinterName
\\ComputerName\PrinterName

If you are running PHP locally to achieve this, then you can use:

file_put_contents("C:\dpd.prn", $data)
exec("COPY /B C:\DPD.PRN \\ComputerName\PrinterName")

If you find install PHP locally too daunting or complex, consider using a basic scripting language like AutoHotKey: https://autohotkey.com/

EDIT: I have since written a nodejs application that you can connect to with a websocket that will copy the data sent to it, to the local citizen printer: https://github.com/MacroMan/DPDLocalPrinter

DPD Label Printing using the PHP API for a Citizen label printer - Sta...

php printing
Rectangle 27 2

My business uses a commercial product called NiceLabel, which has a .NET API for creating labels and a designer for creating the label templates. We used them mostly for barcode labels for items on our shop floor.

It worked well enough for our needs. Granted, we never needed more than a small handful of labels a second. You might consider giving them a call to see if they can meet your performance requirements.

.net - What options are available to developers for printing to a dedi...

.net printing label zebra-printers
Rectangle 27 2

Before sending a UPS GraphicImage label using ZPL format to a Zebra Printer, you need to convert it from base64 string to ascii string. See the answer to How do I Encode and Decode a base64 string

//...UPS Shipment Request construction...
shipmentRequest.LabelSpecification.LabelImageFormat.Code = "ZPL";
shipmentRequest.LabelSpecification.LabelStockSize.Height = "8";
shipmentRequest.LabelSpecification.LabelStockSize.Width = "4";
//...
// Submit the Shipment Request to the UPS Ship Service
ShipmentResponse shipmentResponse = shipService.ProcessShipment(shipmentRequest);
//...Process the Shipment Response...

// The Label is encoded as Base64 Text.  Decode this to standard ASCII Text
string labelData = Base64Decode(shipmentResponse.ShipmentResults.PackageResults[0].ShippingLabel.GraphicImage);

// Write the label data to a file so it can be printed/reprinted as needed
System.IO.File.WriteAllText(@"C:\temp\UPSlabel.zpl", labelData);

The ZPL Label should be printed as RAW using a Generic Text printer driver. You can edit and probably print the label using Notepad as long as you turn off its word-wrap, margins, header/footer/page number settings. Notepad++ works.

printing - UPS ZPL Lable size issue I need small size label for my ZP4...

printing size label ups
Rectangle 27 2

Before sending a UPS GraphicImage label using ZPL format to a Zebra Printer, you need to convert it from base64 string to ascii string. See the answer to How do I Encode and Decode a base64 string

//...UPS Shipment Request construction...
shipmentRequest.LabelSpecification.LabelImageFormat.Code = "ZPL";
shipmentRequest.LabelSpecification.LabelStockSize.Height = "8";
shipmentRequest.LabelSpecification.LabelStockSize.Width = "4";
//...
// Submit the Shipment Request to the UPS Ship Service
ShipmentResponse shipmentResponse = shipService.ProcessShipment(shipmentRequest);
//...Process the Shipment Response...

// The Label is encoded as Base64 Text.  Decode this to standard ASCII Text
string labelData = Base64Decode(shipmentResponse.ShipmentResults.PackageResults[0].ShippingLabel.GraphicImage);

// Write the label data to a file so it can be printed/reprinted as needed
System.IO.File.WriteAllText(@"C:\temp\UPSlabel.zpl", labelData);

The ZPL Label should be printed as RAW using a Generic Text printer driver. You can edit and probably print the label using Notepad as long as you turn off its word-wrap, margins, header/footer/page number settings. Notepad++ works.

printing - UPS ZPL Lable size issue I need small size label for my ZP4...

printing size label ups
Rectangle 27 1

ZebraDesigner Pro is a WYSIWYG labeling application which outputs optimized ZPL label formats so you don't have to learn too much ZPL. You can save these formats on your printer and recall them with the proper variable data, or capture the stream and use the ZPL output in your internal software application. Sending the data to the printer can be done with the driver which is bundled with ZebraDesigner, or through direct communication (TCP, USB, COMM, etc).

We're also writing SDKs to make communicating with Zebra printers more seamless. We started with mobile phones (BlackBerry, WinMobile, iPhone, and Android will be out soon), but a desktop API might also be in the works.

.net - What options are available to developers for printing to a dedi...

.net printing label zebra-printers
Rectangle 27 1

I have modified the open source SharpZebra library to allow ZPL printing:

.net - What options are available to developers for printing to a dedi...

.net printing label zebra-printers
Rectangle 27 1

Thanks. Your comment helped me with a similar issue. It appears that these Brother label printers plainly ignore the PageSettings properties.. once you have it working try putting some wild values in there. Completely ignored - crazy! Set a large enough print area and ensure that you are drawing within the right rectangle and you'll be fine.

Label Printing From C# - Document Size Is Too Large For Printer - Stac...

c# printing
Rectangle 27 0

I want all them in next lines.

vbnewline

Printing in next line in a VB.NET Label - Stack Overflow

vb.net label
Rectangle 27 0

@IBAction func userInput(sender: UITextField) {
    println("This is working")
    usersGuess.text = sender.text
}

ios - Printing input from TextField to a Label in Xcode with Swift - S...

ios xcode swift
Rectangle 27 0

Forget HTML and make a PDF. HTML printing is extremely variable - not just across browsers but across different versions of the same browser. PDF is a lot easier.

Even if you get it exactly right with one browser / font setup / printer / phase of the moon, it will be the most fragile thing you've ever had to maintain. No matter how long you think it will take to make a PDF (and it's not really that hard as there are some free libraries out there), HTML will ultimately take a lot more of your time. PDF readers are widely deployed and print more consistently than even Word files.

I have to agree. We had a similar problem recently and generating PDF's was the quickest and simplest solution. We even went as far as providing a calibration page to handle label and print calibrations for different printers

PDF would be more difficult, and less flexible, than a Word document, wouldn't it?

PDF is less flexible than a Word file in that you can't (easily) edit a PDF file. I don't think that's a consideration here though. PDF is definitely easier to generate than a Word file. This Wikipedia article lists some of the ways to do it: en.wikipedia.org/wiki/List_of_PDF_software

asp.net - Printing barcode labels from a web page - Stack Overflow

asp.net html css printing
Rectangle 27 0

The web is not a format that is guaranteed to get consistent print results. Given the standard support for label printing with MS Word, and the relative ease of automation and generation, I would strongly recommend going that route.

I'm not aware of ANY method to get percise printing across all types of browsers, operating systems, and printers when using web content.

Yeah, but the frustrating thing is that we are soooo close...

You might be RIGHT NOW, but the next FireFox Update, the next IE update, and you rae back to square one.

asp.net - Printing barcode labels from a web page - Stack Overflow

asp.net html css printing
Rectangle 27 0

I also struggled with the HTML/CSS approach due to the inconsistent printing behaviour across browsers.

I created a C# library to produce Avery Labels from ASP.NET which I hope you might find useful:

You can add images and text to the labels, and it's easy to define more labels types.

asp.net - Printing barcode labels from a web page - Stack Overflow

asp.net html css printing
Rectangle 27 0

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.

printing - How to print (barcode) labels from a Ruby on Rails Applicat...

ruby-on-rails printing barcode zebra-printers
Rectangle 27 0

This answer won't solve your problem in 100%. I've tested it against Safari with custom paper settings - same as ones from your example. I was testing it against printing to PDF so maybe with specific printer driver it will behave a bit different. Your example CSS and HTML are missing margin and padding reset. Here is example for @media print:

@media print {
    body, html, p {
        margin: 0pt !important;
        padding: 0pt !important;
    }
    @page {
       margin: 0pt !important;
       padding: 0pt !important;
    }
}

With this settings 2 lines of text are on one page, hover there is still some margin that can't be reduced to 0.

javascript - Printing to a Brother Label Printer from the browser [UPD...

javascript browser printing
Rectangle 27 0

What size media are you using? Is it gap or continuous? What settings are saved on the printer before this label is sent? You might be in a different print mode, and then when this label is sent it changes it to non-continuous gap mode (^MNY) and then it tries to find the gap by feeding a label.

Does it work if you only send this?

^XA
^FO0,398^FR^GB811,2,2^FS
^FO406,0^FR^GB2,236,2^FS
^FO0,606^FR^GB811,2,2^FS
^FO455,234^FR^GB2,165,2^FS
^FO0,843^FR^GB811,2,2^FS
^FO2,232^FR^GB811,2,2^FS
^FO412,604^FR^GB2,240,2^FS
^FO41,41^CI0^ADN,18,20^FR^FDFrom:^FS
^FO427,41^CI0^ADN,18,20^FR^FDTo:^FS
^FO41,264^BY2,2.0,102^B3N,N,102,N,N^FR^FD^FS
^FO22,248^CI0^A0N,17,17^FR^FDOrder Number:^FS
^FO463,238^CI0^ADN,18,20^FR^FDCarrier:^FS
^FO488,264^CI0^A0N,23,23^FR^FD^FS
^FO22,412^CI0^ABN,22,14^FR^FDORDER#^FS
^FO49,443^CI0^A0N,28,56^FR^FD^FS
^FO41,61^CI0^A0N,23,23^FR^FDRandom Address^FS
^FO41,102^CI0^A0N,23,23^FR^FDOne Industrial Rd^FS
^FO41,122^CI0^A0N,23,23^FR^FDSuite 199^FS
^FO41,142^CI0^A0N,23,23^FR^FDThistown, PA 12345^FS
^FO20,508^CI0^ABN,11,14^FR^FDP.O.#^FS
^FO366,508^CI0^ABN,11,14^FR^FDSHIP DATE^FS
^FO20,526^CI0^ABN,11,14^FR^FD^FS
^FO370,524^CI0^ABN,11,14^FR^FD05/15/14^FS
^FO421,614^CI0^ADN,18,20^FR^FDFOR:^FS
^FO427,691^CI0^A0N,23,23^FR^FD^FS
^FO427,711^CI0^A0N,23,23^FR^FD^FS
^FO427,650^CI0^A0N,23,23^FR^FD^FS
^FO163,914^BY2,3.0,203^B3N,N,203,N,N^FR^FDRC051514E^FS
^FO45,862^CI0^ADN,18,20^FR^FDRC051514E^FS
^FO427,61^CI0^A0N,23,23^FR^FD^FS
^FO427,102^CI0^A0N,23,23^FR^FD^FS
^FO427,122^CI0^A0N,23,23^FR^FD^FS
^FO427,142^CI0^A0N,23,23^FR^FD^FS
^FO549,610^CI0^A0N,17,17^FR^FDCUST NO:^FS
^FO650,610^CI0^A0N,17,17^FR^FD^FS
^FO345,406^CI0^A0N,39,78^FR^FDPQ^FS
^FO447,406^CI0^A0N,39,78^FR^FD1^FS
^FO650,142^CI0^A0N,23,23^FR^FD,^FS
^FO671,142^CI0^A0N,23,23^FR^FD^FS
^FO711,142^CI0^A0N,23,23^FR^FD^FS
^FO427,732^CI0^A0N,23,23^FR^FD^FS
^FO650,732^CI0^A0N,23,23^FR^FD,^FS
^FO671,732^CI0^A0N,23,23^FR^FD^FS
^FO711,732^CI0^A0N,23,23^FR^FD^FS
^PQ1
^XZ

Zebra Label Feeds Blank after printing - Stack Overflow

printing zebra-printers zpl-ii
Rectangle 27 0

I had the exact same error message when the exception occurred. The solution for me was to set the "Platform target" to "X86" CPU. This can be done via: (menu) Project -> Properties -> (tab) Build -> Platform target "x86" Instead of "Any CPU"

I have developed the software on Windows 7 64 bit.

You can find more info about this in the b-PAC SDK documentation. C:\Program Files (x86)\Brother bPAC3 SDK\Doc\bPAC30_eng.chm In the section "Troubleshooting" you will find: "The program does not operate on a 64-bit operating system. Change the platform to "x86", and then recompile it."

This solution is tested with the QL560 hardware connected to my PC and it worked.

bpac 3.0+ starts support 64bit; have you tried?

.net - Label printing development using b-pac SDK in a C# application ...

c# .net printing label
Rectangle 27 0

How do you intend to verify the results of your coding without the physical unit?? Brother does not offer any sort of visual emulator, so your best bet is to get the unit. These can be had for $75 street price, and likely on the shelf at your local office supply store. http://www.officedepot.com/a/products/506232/Brother-P-Touch-QL-500-PC/

Thanks Jamie yes i understands this factor. I can't purchase a printer. But i have a solution and i need Help. I need to set assemblies and write code correct. and when this installs on the customer's computer. As customer has the printer and driver. NOW, If i wrote the code correct and set every things to its location. then i hope no bad thing happen. Important thing is what are the key steps in development that i should check for this very task. This is a risky step but its my need and i can't deviate.

.net - Label printing development using b-pac SDK in a C# application ...

c# .net printing label
Rectangle 27 0

This can be achieved by manipulating the XML in an avery-formatted .DOCX file. No third party components required, and you can modify it to suit any datasource, XML, DataTable, etc.

Printing Avery labels from ASP.NET MVC - Stack Overflow

asp.net-mvc-2 printing asp.net-ajax asp.net-mvc-3 label
Rectangle 27 0

It looks like the problem I was having was due to printer calibration.

With a bit of help from a friendly dev at Zebra (Hi, Chip!) I licked the "too many labels feed" problem.

The solution was to calibrate the printer ~JC, then save the settings ^JUS. The ~JC command is used to "Set Media Calibration" and will "force a label length measurement". Since I'm using black bar media, I don't have to specify the physical size of the labels (Unless someone can correct that), and the printer handles that all by itself.

The entire ZPL document/file that solved my problem is here:

~JC
^XA
^JUS
^XZ

Now everything works as I expected it to. For now.

php - Label printer advancing 8 labels before actually printing simple...

php zebra-printers zpl