Working with the "Display_printer_interface"
Display_printer_interface is a subcomponent that allows the user to print a view onto a physical label on a printer. This printer is connected to the suitable module (PD 688 or PD 803) through the USB port.
Now call the method Display_printer_interface.Print() to start printing. After this method is finished, you have printed successfully onto a physical label. (It’s recommended to run the Display_printer_interface.Cut() method in immediate continuation of the .Print() method, to avoid manual removal of label.)
Furthermore we have a Display_printer_interface.Feed() method, which can be used to release paper from the printer without printing. (Helpful method, if the printer isn’t produced with a physical “Feed” button.
Be aware that a component which includes the Display_printer_interface, can only be located in a device with the Display_printer component. At this time only the PD688 and the PD803.
Among these, the “Position relative to” option which should be set, following our best practices', to either, Absolute with a “Position.x, Position.y” of (0,0), or Align to top border. This way we can ensure that the physical label is as designed in the editor.
Furthermore it is important not to tick the “Non closeable” checkbox because this will result in an unwanted behavior, which will result in a wrong end result.
We also have some limitations involving colors, due to the subcomponent which is only designed to print in black/white. If we are trying to print a color rich illustration on the printer, then a method will try and calculate each pixel to decide whether it should be painted or not (black or white). Therefore it is recommended to design the drawing in black/white, if it’s intended to be printed onto a label.
You should now be ready to print your own visualization with the Display_printer_interface.