6 Replies Latest reply on Jun 18, 2018 6:38 AM by mahmoud zahran

    ZSDK - iOS with PCX images

    Josh Vance

      Hello -


      I'm attempting to include a PCX image on a label using the ZSDK.  For our Android solution, everything is working...  I use storeImage to copy a file from the Android device to the printer and it saves on the printer as as a .pcx file.  Then I use the CPCL PCX command (ie 'PCX90 100 100 !<logo.pcx\r\n') to include the image on the label.


      But the same approach doesn't seem to work for iOS?  There, I'm using the storeImage method, but it copies/converts the source image file to a .GRF file on the printer.   So the CPCL PCX command doesn't work.  I've tried both 'PCX90 100 100 !<logo.pcx\r\n' and 'PCX90 100 100 !<logo.grf\r\n'.  So...


      Is there a way to use the iOS version of the ZSDK_API to move a file from the iOS file system to a pcx file on the printer (so the CPCL will work)? ... or

      Is there a CPCL command that will print a GRF image on a label?


      I'm using a QLN320 printer.  We have a bunch of CPCL code that I would prefer not to switch to ZPL.



        • Re: ZSDK - iOS with PCX images
          Manuel Caicedo-Rivera

          Hello Mark,


          Please, could you tell us if the printer has configured the printer language in CPCL or LINE_PRINT, also if you can share the CPCL code?


          Technically, the LINK-OS SDK will be selecting the type of format in PCX or GRF to be stored depending on the printer language of the printer.






          PD: CPLC is one of our Legacy printer languages. We are recommending to developers migrate from CPCL to ZPL due to that ZPL will be the only printer language that will be supported in the future with improvement and new features.

            • Re: ZSDK - iOS with PCX images
              Josh Vance

              Hi Manuel -


              The LINK-OS ZSDK_API documentation for iOS says the following for the



              *"Stores an image from the Apple® mobile digital device's file system to

              the connected printer as a monochrome image.*


              *The image will be stored on the printer at printerDriveAndFileName with

              the extension GRF. If a drive letter is not supplied, E will be used as the

              default (e.g. FILE becomes E:FILE.GRF). If an extension is supplied, it is

              ignored (E:FILE.BMP becomes E:FILE.GRF)."*


              That implies that for iOS, the file is always copied as a GRF file.


              Are you saying in your reply that storeImage on iOS will actually save as a

              PCX if the printer is in CPCL mode (counter to the documentation)?


              The cpcl that we send is dynamic, but here's a simplified example:


              !0 200 200 800 1


              PW 800






              TEXT270 5 1 295 50 SOMETEXTHERE


              PCX90 40 490 !<logo.pcx





              In this example logo.pcx is the file that I tried to send to the printer.

              Using the android SDK, it works fine...  logo.pcx is written to the printer

              and referenced correctly in the cpcl.  The label prints fine, showing the

              pcx image.  Using the iOS SDK, the label doesn't print.  I believe that's

              because the file is written to the printer as a GRF file, so logo.pcx

              doesn't exist on the printer.




              1.  How can I force the storeImage method in the iOS SDK to store the file

              as a PCX file so that I can use the same CPCL command for both platforms?

              Is there an SDK method to use to force the printer into CPCL instead of

              LINE_PRINT before I issue the storeImage method?  Will that cause the

              storeImage method to write a PCX instead of a GRF?  or...


              2.  How do I use CPCL to print a GRF file.  The PCX90 command will not work

              with logo.grf...  PCX90 40 490 !<logo.grf doesn't  work.  Is there a GRF90

              CPCL command?







              On Tue, Jan 17, 2017 at 12:28 PM, MANUEL CAICEDO-RIVERA <