Returns a person's profile photo data in ZPL format for use in Zebra printer labels. If the person has no photo, the default silhouette photo (adult/child, male/female) is used.
Additional Details
This filter has optional input parameters:
- Size (optional): Specifies the width and height of the image in pixels. If not specified it will
default to 395 which is good for a 300 dpi Zebra printer but possibly not for a 203 dpi printer.
If using a 203 dpi printer try using a number like 150 or so.
- Brightness (optional) v5.0: Specifies the brightness
adjustment (0 to 1.99 fully white).
- Contrast (optional) v5.0: Specifies the contrast
adjustment (0 to 1.99).
- Filename (optional): The filename that should be used when sending photo contents to the printer.
- Rotate Degree (optional): The degree of rotation to apply to the photo. Valid values are 90, 180 or 270.
v8.4
This filter will insert the image data into a property called "LOGO.PNG". You will still need to write additional ZPL
code to specify the placement of the LOGO.PNG property onto the label.
Example:
^FD{{ Person | ZebraPhoto:'397',1.0,1.0,'LOGO',90 }}^FS
^FD^FS~DYR:LOGO,P,P,12246,,89504E470A50C317A8C32490DF5A6...90A9CD5B34A9B0FA2A842E095F5CE082^FD^FS
Note:
When used with a check-in label, you will need to add a field to your label ZPL (such as ^FDPhoto^FS
) and a new Label Merge Field (with
{{ Person | ZebraPhoto:'397',1.0,1.0 }}
) so you can map them together in Rock's Check-in label editor. When Rock substitutes
the "Photo" field with the Lava and executes it, the output shown in the example will be put into the label's ZPL stream with a filename of "LOGO"
(or whatever you specified in the lava's optional input parameter). You will also need to specify the X,Y placement of the logo in your
ZPL with the ^FO Field Origin command and a ^XG (Recall Graphic) name and extension with a value of LOGO.PNG as seen in this sample:
^FO25,68^XGR:LOGO.PNG,1,1^FS
The brightness and contrast parameters need to be set to "1" (the default) in order for the generic silhouette images to print. If specified, both parameters need to have a leading digit, i.e. "0.5" instead of ".5". In order to specify rotation, all preceding parameters must be entered (as in the example above).
This Lava filter takes advantage of kind of ZPL injection technique whereby the opening ^FD (start of field data)
is closed by the Lava output's ^FS (end field separator) command before the needed ZPL (~DYR:LOGO,P,P,...etc..) is
added into the label data (as described here).
Last, the Lava output adds a start of field data ^FD command to match your existing end of field data ^FS command.
Note: Prior to Rock v7 this filter used the E: (EPROM) storage location instead of R: (RAM). Therefore you will also need to replace
the XGR: with XGE: in your ZPL for earlier versions of Rock.