3 Replies Latest reply on Dec 16, 2011 9:50 AM by Daniel Silva

    APD, seeking example to print image

      Within the APD documentation, I don't see if the APD supports image output.

      Do you have any examples of APD sending images to a printer?

        • Re: APD, seeking example to print image
          Daniel Silva

          I have done this in the past using the "send format" functionality.  This basically allows you to send raw binary data to the printer. The bitmap data is actually stored in a format file on the device file system, so this will work if you're always printing the same image.  What you need to do is build a binary file that has the bitmap data and any commands that the printer needs to know what to do with it.  What I do is start with a bitmap file, then use a hex editor to add in the native printer "print bitmap" commands at the beginning of the file.  For instance for a Zebra TTP2030, I add hex 1B 62 00 00 64 00 00  just before the "BM" which is the start of the bitmap data.  That is the binary data to tell the printer that there is bitmap data coming and telling it where to print it on the page.  This would be different for a different printer using a different printer language.  You might be thinking that it would be easier to send that binary command in a seperate file, but I have found that if you do that, there will be some other characters sent between that data and the bitmap, so it won't work correctly.  If you put it all in one file, it works.  I have 2 customers using this in production today using PocketBrowser on MK500 devices (printing their logo on on the top of the page).  I use an older free version of the hex editor from hexedit.com.  Not sure if there's still a free version or not, but any hex editor you can find should work.

            • Re: APD, seeking example to print image

              Hi Dan,

               

              How would you transmit the BMP to the printer?

              The APD doesn't seem to offer a binary parameter to send to the printer.

              Currently, I'm sending simple text output through a command such as this:

              apd.PSExternal(266, strOut );

               

              The APD Programmer's Manual doesn't seem to indicate a command for sending binary data, only TEXT() types.

              The APD documentation has a PDF with notes about a printing Demo, however I don't see the demo code contained within the MSI file.

              Is there additional APD documentation that would describe sending Binary images to the printer?

               

              Regards,