0

I'm using a Zebra Technologies ZTC ZT230-300dpi ZPL printer to push an image via network to the printer. I have a Word template that I convert to HTML using OpenXMLPowerTools, then to an image using CoreHtmlToImage, and finally to ZPL using Zplify.

I am going through these multiple conversion steps because I couldn't find any direct method to convert a Word document to ZPL.

Here's the issue:

  1. When I convert the Word document to HTML, the font family remains intact.
  2. After converting the HTML to an image and then to ZPL, the font style still appears correct when I verify using an online viewer or a virtual ZPL printer.
  3. However, when I push the ZPL code to the actual printer, the font family does not match the original Word document.

Has anyone encountered a similar issue or have any suggestions on how to retain the font family correctly in the final printed output? Any tips or alternative approaches for converting a Word document to ZPL with the correct font styling would be greatly appreciated.

Thank you!

I'm using the below code, to send the command to printer.

var converter = new ZplImageConverter() { InterpolationMode = InterpolationMode.HighQualityBicubic };
var zplCommand = converter.BuildLabel(bitmap);

printerSocket.Send(Encoding.ASCII.GetBytes(zplCommand));

Is the font changing because it gets expanded when converting to an image before sending it to the printer? Could this be the issue affecting the font family?

2
  • Sounds like you are doing too many steps. Going via PDF might be a better idea: there are existing tools for PDF to ZPL. That would keep it as text, then you load the correct fonts to the printer using Zebra's tools or embeedded in the ZPL. Either way: if you are rendering to an image then there is no way for the font family to change. Either you are actually rendering the text itself in ZPL (and the printer doesn't have the font) or the image isn't what you thought. Commented Aug 6, 2024 at 10:31
  • 1
    I couldn't find any direct method to convert a Word document to ZPL - have you tried opening it in Word and printing to that printer? Other than that, the printer would absolutely not try to alter an image, if you are sending an image, so if your fonts look off in the image, that must have happened at the stage where you converted the HTML to image. Are you sure it's a font family issue though, and not threshold effects due to no/insufficient dithering in your image? Commented Aug 6, 2024 at 13:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.