B4J Question Zebra ZXP Series 7 – Text Not Printing When Using WebView (Only Images Are Printed)

afields22

New Member
Hi everyone,

I am using a Zebra ZXP Series 7 card printer to issue staff ID cards.
For this purpose, I have developed an application that not only manages the staff database but also handles card printing.

The process:
- The card design is based on an HTML template.
- The HTML is rendered in a WebView, and then sent to the printer using the code below.
The issue:
- Printing works perfectly for images.
- However, any text elements present in the HTML are not printed at all.
- This issue only occurs in this staff card program; when issuing student cards (using a different program, but the same printer and HTML/WebView workflow), everything prints as expected, including text.

My question:
Is there any parameter or configuration (either in the printer, the OS, or B4J) that could now be required to enable text printing?
Has anyone faced a similar issue with WebView printing or Zebra printers?


Code used for printing:


used for printing:
Dim P As Printer
P = GetPrinter("Zebra ZXP Series 7 Network Card Printer")
If P.IsInitialized = False Then
    Log("Zebra printer not found.")
    Return False
End If

Dim paper As Paper = P.GetPrinterAttributes.GetDefaultPaper
Dim pl As PageLayout = P.CreatePageLayout(paper, PageOrientation_Static.LANDSCAPE, 0.5, 0.5, 0.5, 0.5)

Dim PJ As PrinterJob = PrinterJob_Static.CreatePrinterJob2(P)
PJ.GetJobSettings.SetPageLayout(pl)

'Dim joWV As JavaObject = wv
'Dim engine As JavaObject = joWV.RunMethodJO("getEngine", Null)

Dim WVJO As JavaObject = wv
WVJO.RunMethodJO("getEngine", Null).RunMethod("print", Array(PJ.GetObject))




Additional info:

- The workflow and code are almost identical in both staff and student card programs.
- Only the staff card app is showing this text printing problem.
- The HTML preview in WebView looks correct (both text and images display).
- Tested with different fonts and simple HTML (no improvement).

Any advice or suggestions would be greatly appreciated!
Thank you in advance.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…