public static void GenerateBarcodesFromInventory() { try { ClearDir(BarcodesDirectory); } catch (IOException e) { Console.WriteLine(e.Message); } try { //string charset = "UTF-8"; // or "ISO-8859-1" BarcodeGenerator.createDMCodes(200, 200); } catch (WriterException e) { Console.WriteLine("Could not generate Barcode, WriterException :: " + e.Message); } catch (IOException e) { Console.WriteLine("Could not generate Barcode, IOException :: " + e.Message); } }