4 Replies Latest reply on Jan 6, 2017 11:45 PM by Bartosz Baranski

    PHP Text Printing

    Donnie Harman

      I am new to the ZPL world, and am attempting to print a raw string to a ZP 450 - installed locally on Windows 7 (USB).

       

      My PHP program is fairly simple, but is failing to open the printer.

       

      I have installed the printer as a generic windows printer - per instructions from my U.P.S. representative.

      I verified my PHP printer related entries with SMEs in that arena.

       

      I'm not sure how to verify communication with the printer, since the Zebra driver is not being utilized.

      I have working for a few days on trying to communicate via Windows - or via my PHP.

       

      I am also trying to simply copy the string into Notepad (and similar), and send it to the printer.

       

      Any help is appreciated.

       

      Of course, I can provide further details, if anyone is able to help me dig.

        • Re: PHP Text Printing
          Robin West

          Hi Donnie,

          If you just want to try out a text editor and print from a generic text driver, try typing just this "~WC" without quotes and printing the file.  It should print a label (or several) showing the high level print settings of the printer.  If it does not, you may need to look again at that driver to how you set it up.  Let me know and I should be able to walk you through it in more depth.

           

          Can I ask, If you are programming in PHP, why are you connecting to a printer via USB?  I would think if you were writing server software, you would be connecting over a network?  More my curiosity than anything, but most of the sample code we have for Windows to USB printers is .NET based because that's what most of our developers are asking for. 

            • Re: PHP Text Printing
              Donnie Harman

              Robin, thank you so much for the reply!

              Firstly - yes, using PHP to do this is a little odd.  Unfortunately, the application I will be inserting this functionality into is a PHP page - and the various users have printers installed locally.

              I'm not hung up on the generic/text thing, it is just the recommended starting point I was given.

              What I've tried so far:

              - Set up printer with Windows generic/text driver

              - Set up printer with Zebra ZP series 200 dpi driver (not sure about this one for a ZP450)

               

              - Attempted to print from a program

              - Attempted to print form Notepad (using your ~W suggestion)

               

              In all cases, I am viewing the print queue during attempt.

              I see the brief presence of the document, but it then disappears without printing.

               

              I feel as though I am just setting up the printer inappropriately, and if I can get any printing to occur - I will have a better chance to develop the code to send the ZPL string to the printer.

              I have the UPS label string decoded and ready to print, and have verified the contents via Labelary online.

               

              The Zebra disk I have has the following drivers available:

              Eltron LP2348, LP2844, TLP2044,

              UPS Thermal 2442, 2542, 2543, 2844,

              Zebra 140XiIII, R110XiIII, S4MDT-200, Z4MplusDT, ZM400DT, ZP Series, ZP455(EPL), S4M-203dpi EPL

               

              Again - it is unfortunate that I cannot do this in a .net environment, but such is the challenge.

               

              Thanks again for any advice Robin!