Print Labels

Trying to print some labels in a Label Printer Nexuspos x-nx 424 u
Using the Labels example project fron the xojo examples, if I chose a normal printer works fine, but if printing job is sent to the Label Printer nothing happens
Any tip for this ?

Operating system?


How do you print?
Xojo’s graphics class with OpenPrinter?

Or using direct commands via Socket/SerialPort?

As I said is the Labels examle from xojo examples:

Dim g As Graphics
Dim p As PrinterSetup

p = New PrinterSetup
If p.ShowPageSetupDialog Then
  g = OpenPrinterDialog(p)
  If g <> Nil Then
    Dim hDPI As Double = p.HorizontalResolution
    Dim vDPI As Double = p.VerticalResolution
    Dim pageWidth As Double = p.PageWidth
    Dim pageHeight As Double = p.PageHeight
    g.FontName = "Arial"
    g.FontSize = 9
    // Width and height of label in inches
    Dim labelWidth As Double = WidthField.Value.Val / 25.4
    Dim labelHeight As Double = HeightField.Value.Val / 25.4
    // Width and height of label in page points
    Dim labelPageWidth As Double = hDPI * labelWidth
    Dim labelPageHeight As Double = vDPI * labelHeight
    // Draw as many labels as fit into the size of the page
    For x As Integer = 1 To pageWidth Step labelPageWidth
      For y As Integer = 1 To pageHeight Step labelPageHeight
        If (y + labelPageHeight) < pageHeight And _
          (x + labelPageWidth) < pageWidth Then
          g.DrawText(LabelArea.Value, x, y)
        End If
  End If
End If

Well, maybe you need to change PrinterSetup and reduce margins, so you see text?

Hey hi, you should check the printer setting and check that the Label Printer is properly configured in the system.