public void Print(String text, String fontName, Int32 magnificationFactor, Int32 offsetX, Int32 offsetY, Int32 copies) { String labelScriptFile; ZPLGenerator ZPLGen; try { ZPLGen = new ZPLGenerator(); labelScriptFile = Environment.GetEnvironmentVariable("TEMP") + "\\Chi_ZPL.ZPL"; // Write the ZPL script to the temporary location on the local disc. ZPLGen.GenerateAlphaNumeric(labelScriptFile, text, fontName, magnificationFactor, offsetX, offsetY, copies); // Print file. Print(labelScriptFile); // Delete script file. File.Delete(labelScriptFile); } catch (Exception ex) { MessageBox.Show("Error when attempting to print label: " + ex.Message, Config.GetDialogTitleStandard(), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }