13 Replies Latest reply on Feb 26, 2019 9:42 AM by Gustavo Leao

    Problem when printing with linkos

    Gustavo Leao

      Hi everyone.

       

      I'm developing a Windows application in WPF, which uses the "link-os" SKD to print a large amount of tickets over a USB connection with a GC420t. The latest problem, and this is what makes me lose sleep at night, is that during printing, the printer apparently loses the detection of the mark (or gap) and begins to print the content in a wrong position relative to the top of the ticket.

       

      Important points:

      - My software build a ZPL string in runtime and sends it to the printer;

      - I'm using the "GC420t" driver (non EPL);

      - The printer properties are correctly assigned: label size, media type, speed, darkness, etc;

      - The printer is calibrated.

       

      Below, attached ZPL sample code, and the link to a video that demonstrates exactly the moment the error happens. Every help is welcome. Thank you very much.

       

       

       

      Zebra GC420t error while printing - YouTube

       

      ZPL Sample code attached.

        • Re: Problem when printing with linkos
          Dmitry Prokhorov

          Hello Gustavo,

           

          I have checked your attached ZPL sample code and it looks ok.

          So far I can see (by field values) it is not exactly a code that is reproducing the issue on your video.

          Would you please to provide a code that is reproducing your issue?

           

          Dmitry Prokhorov

          Software Engineer, Kutir Mobility

          Posted on behalf of Zebra Technologies

            • Re: Problem when printing with linkos
              Gustavo Leao

              Hi, Dmitry. Thanks for answering.

               

              The code I sent is slightly different from what was used in the video, but the template is the same and the error happens for both. Only the image and some other dynamic data are inserted into zpl at runtime by our system. All the images used in the tickets have the same dimensions. Thank you again.

               

              Gustavo Leão

            • Re: Problem when printing with linkos
              Dmitry Prokhorov

              Hello Gustavo,

               

              Could you please to run ~JG command and share a photo of result?

               

              Dmitry Prokhorov

              Software Engineer, Kutir Mobility

              Posted on behalf of Zebra Technologies

              • Re: Problem when printing with linkos
                Dmitry Prokhorov

                Hello Gustavo,

                 

                Also possible cause of your problem could be in image data that seems you transfer to printer in ZPL with each label. It may lead to buffer overflow problem in your printer and you may need to check printer readiness by reading printer status.

                 

                As a workaround for this problem it would be good to implement a template for your label. It could contain your image. Then you will need just to print that template with specific values assigned to template fields. It may be more optimal approach to print your labels.

                 

                Dmitry Prokhorov

                Software Engineer, Kutir Mobility

                Posted on behalf of Zebra Technologies

                  • Re: Problem when printing with linkos
                    Gustavo Leao

                    In fact, I do not send an image on each label. At the top of the ZPL I use the ~DYE: command to save the image to printer memory, and on each label I add this image with the ^IME: command.

                     

                    Please, if possible, give me an example of how I could change my code to suit your suggestion. Thank you so much again.

                     

                    ~DYE:LOGO1,P,P,34149,,89504E470D0A1A0A0000000D49484452000001E0000000DC08020000002779(continues)...

                    ^XA^LS0^LT0^XZ

                    ^XA^FO70,0^IME:LOGO1.PNG^FS^XZ

                    ^XA^FO70,0^IME:LOGO1.PNG^FS^XZ

                    ^XA^FO70,0^IME:LOGO1.PNG^FS^XZ

                    ^XA^FO70,0^IME:LOGO1.PNG^FS^XZ

                    ^XA^FO70,0^IME:LOGO1.PNG^FS^XZ

                      • Re: Problem when printing with linkos
                        Dmitry Prokhorov

                        Hello Gustavo,

                         

                        You are right, currently you are sending image once in each print session. However, so far your image is stored on printer you don't need to send it with ^DY command each session. It is enough to send it there just one time and then to use it in all print sessions. It would make communication with printer more optimal.

                         

                        Dmitry Prokhorov

                        Software Engineer, Kutir Mobility

                        Posted on behalf of Zebra Technologies

                          • Re: Problem when printing with linkos
                            Gustavo Leao

                            Hi, Dmitry.

                             

                            I realize that my earlier explanation of how our system handles the images has gotten a bit incomplete.

                            Therefore, I will give more details about its operation:

                            When the system is started and the first print is requested, before saving any image in the printer memory, we delete all the png files saved previously, with the command: ^IDE:*.

                            After this, whenever an image is sent to the printer, we record this information in a global variable so that we can reference it in the future without having to send anything else to the printer.

                            In other words, we only send images to the printer that are not already there.

                             

                            Thank you again, Dmitry. Your help has been very important.

                             

                            Gustavo Leão