There is no library for your second question for this. ZPL is a proprietary language, and Zebra does not offer libraries to turn ZPL into an image. However, there is a way to do something similar on the printer web page (available for some printers).
Click on the "Directory List" section on the printer, then click "Create New Script."
Here you can enter ZPL and then select “Preview Label”, and this should show you how the shortcut will look
source
share