Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

GMImage.GetZPL

Queries image as ZPL hex image.

Component Version macOS Windows Linux Server iOS SDK
GraphicsMagick 10.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "GMImage.GetZPL"; ImageRef { ; Flags } )   More

Parameters

Parameter Description Example Flags
ImageRef The image reference number. 1
Flags Pass various flags.
Currently 1 for skipping header/footer.
0 Optional

Result

Returns text or error.

Description

Queries image as ZPL hex image.
This is for sending data to a receipt printer. The picture is read as black & white image and we build the hex string, you can send to the printer. You can pass in a color, grayscale or b&w image.
Picture needs to have a width dividable by 8.

Examples

Get ZPL encoded image:

Set Variable [ $BigImageRef ; Value: MBS("GMImage.NewFromContainer"; Pictures::Image) ]
# put the ZPL image in container:
Set Field [ Pictures::Result ; MBS( "GMImage.GetZPL"; $BigImageRef ) ]
Set Variable [ $Error ; Value: MBS("GMImage.Free";$BigImageRef) ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 1st June 2020, last changed 20th June 2023


GMImage.GetXMP - GMImage.GetcolorMap

💬 Ask a question or report a problem