问题
Possible Duplicate:
Print preview ZPL II commands using .NET WinForm before sending it to Zebra printer
I start developing an utility on .NET 4.0 for Zebra Printer 105SL. Maybe someone know these devices.
I have some questions:
I've just started learning ZPL code. Does it exist some utility for rendering Zebra printer code (ZPL)? For example input is ZPL code and output is some label image.
Does it exist a library for rendering ZPL code? Input is ZPL code output is some image.
Now I can print on Zebra printer only if Zebra printer is installed localy on computer. So next step is to know only IP adresses of Zebra printer. Zebra printer will not be installed on computer on which the user will use my utility. I need to find a way to send data (print) to Zebra printer by IP adress.
Maybe I have many stupid questions but thanks for everybody who will help me.
回答1:
This isn't exactly the same question, but this answer seems to be what you want?
Send data to thermal printer
回答2:
Like George said, this question addresses sending ZPL to a printer.
Sending ZPL to a network printer should be no problem, just use the network printer name.
For images, they need to be in PCX format. You first send the PCX file to the printer (using the same method that you send other ZPL commands), then you send the ZPL referencing the image in the printer's memory. It's easier to get a grasp on how this is done by generating a label with a picture in Zebra Designer and looking at the ZPL it generates (check Print to File in the printer dialog).
回答3:
For your second question, there is no library for this. ZPL is a proprietary language and Zebra doesn't offer libraries to turn ZPL into an image. There is, however, a way to do something like this with the printer's web page (available for some printers).
Click on the Directory Listing section of the printer, then click on "Create New Script".
Here you can type in ZPL and then choose "Preview Label" and that should show you what the label will look like
来源:https://stackoverflow.com/questions/6336684/developing-an-utility-for-rendering-zpl-code-of-zebra-printer-105-sl