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.

The view to be printed is selected in the subcomponent through the instance constant Root_view_to_open.

The instance constant can be set at component level, assembly level or project level.


Once the subcomponent is located in a project, you also get the option to locate the print view through the Display_printer ‘s guest view, just as you would do with a normal view in the Display_screen.  

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.


Designing your printer visualization for the "Display_printer_interface"

The visualization, which we want to be printed onto the physical label, is a descendent to a view. This could be an Asm_view, Comp_view or just a Basic_view dependent on which type of visualization we are planning to print.

Best practice is to have a maximum view_region “X&Y” position of 70mm x 140mm.  

When the view is created and selected through the subcomponents instance constant Root_view_to_open, there is a few things to be aware of.

By clicking the instance constant we get access to change some properties. 

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.