4 Replies Latest reply on Feb 25, 2019 1:03 AM by Trevor Thomas

    QLn320 Images and CPCL

    Trevor Thomas

      Hello, hopefully someone will be able to help me. Ive done alot of work with the ZT410 and other type of printers, but im having a few issues with the QLn320.

       

      Ive been able to push an image into the printer using ZPL

       

      ~DGE:LOGO,2496,32, FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0,::::::FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFE0,FFFFFE0000003FFFFFF800003F800003FFFFFF000003FFFFC000000000FFE0,FFFFFE0000001FFFFFF800003F800003FFFFFE00000FFFFC00000000003FE0,:FFFFFE0000001FFFFFF800003F800003FFFFFE00000FFFE000000000003FE0,FFFFFE0000001FFFFFF000003F800003FFFFFE00000FFF0000000000003FE0,FFFFF80000001FFFFFF00000FF800003FFFFFE00000FFE0000000000007FE0,  (some code removed)

      • but how can i acheve writing an image to the printers non volitile memory using CPCL?

       

      Then im able to print it using the ZPL code

      ^XA

      ^FDLabel Formats!!^FS

      ^XGE:logo

      ^XZ

      • but how can i print the same image using cpcl? ive tryed things like the code below doesnt work

      ! 0 200 200 210 1

      PCX 0 0 !<LOGO.PCX

      FORM

      PRINT

       

       

      Any help will be much appreciated.

       

      Kind regards

       

      Trev

        • Re: QLn320 Images and CPCL
          Dmitry Prokhorov

          Hello Trevor,

           

          There is a PCX command that gives a user the ability to send “.PCX” graphics formatted images to the printer. The .PCX image MUST be encoded as a black and white image. This way PCX image get loaded into the printer’s flash file system and given a name you provided for it. Then another PCX command with “!<“ operator can be used to instruct the printer to get the data stored in the named file and use it for building the image.

           

          Please, see pages 95 and 96 of  CPCL Programming Manual document for details.

           

          Dmitry Prokhorov

          Software Engineer, Kutir Mobility

          Posted on behalf of Zebra Technologies

            • Re: QLn320 Images and CPCL
              Trevor Thomas

              Yes i did see that but i do have a few questions if thats ok?

               

              Format:

                   {command} {x} {y} {data}

                   where: {command}: PCX

                               {x}: X-coordinate of the top-left corner.

                               {y}: Y-coordinate of the top-left corner.

                               {data}: PCX image data.

               

              why would you need to speify the top left corner of the image as surly it would always be 0 and 0? as when you render the image you can then move it left and right with the x and y command?

               

              Lastly the {data} part, is that literally the byte data of the PCX file? and the name of the file is the original pcx files file name.

               

              Thank you again for your help with this

               

              Trev

                • Re: QLn320 Images and CPCL
                  Dmitry Prokhorov

                  Hello Trevor,

                   

                  From more recent version of CPCL manual for Link OS compatible printers we can see:

                  https://www.zebra.com/content/dam/zebra/manuals/software/linkos/cpcl-link-os-pg-en.pdf#page=134

                   

                  Those {x} and {y} are coordinates of origin for the PCX file to be printed on a label.The {data} part is binary data containing the entire PCX file to be printed. This must include the header and the RLE compressed data. The data size to be transmitted is determined by the PCX file format itself, and does not need to be specified. The Data field must be terminated with a <CR><LF> after the last character of the binary data. Data may contain all binary values including NUL characters.

                   

                  Dmitry Prokhorov

                  Software Engineer, Kutir Mobility

                  Posted on behalf of Zebra Technologies

              • Re: QLn320 Images and CPCL
                Trevor Thomas

                Thank you Dmitry,

                 

                That manual is far better than the one i have.

                 

                Kind regards

                 

                Trev