c# - How to download barcode labels in MVC4? -


i have bar codes stored in database , want allow user download label of bar code products. how can convert number e.g 5036040142375 image of barcode , user print out of labels.

i have used barcode generation library - http://www.barcodelib.com/

and following code generate barcode, posting barcode generation code again, because in code can see barcode generation process generating png image can save , use ever like, display or provide download users etc -

        /// <summary>         /// method used generate bar code item         /// </summary>         private static string generatebarcode(string path, string code)         {             barcodelib.barcode b = new barcodelib.barcode(code, barcodelib.type.code39);             image img = b.encode(barcodelib.type.code39, code, 300, 50);             string filename = guid.newguid().tostring() + code + ".png";             b.saveimage(httpcontext.current.server.mappath(path + "/" + filename), barcodelib.savetypes.png);             return filename;         } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -