c# - Barcode with Text Under using ItextSharp -
i using itextsharp in application generate barcode. though working wanted, need display value of barcode under barcode 1 showin in attached image.
below c# code use:
barcode39 barcodeimg = new barcode39(); barcodeimg.code = barcodevalue.tostring(); barcodeimg.createdrawingimage(system.drawing.color.black, system.drawing.color.white).save(stream, imageformat.png);
this code found while searching net. hope solves problem:
string prodcode = context.request.querystring.get("code"); context.response.contenttype = "image/gif"; if (prodcode.length > 0) { barcode128 code128 = new barcode128(); code128.codetype = barcode.code128; code128.checksumtext = true; code128.generatechecksum = true; code128.startstoptext = true; code128.code = prodcode; system.drawing.bitmap bm = new system.drawing.bitmap(code128.createdrawingimage(system.drawing.color.black, system.drawing.color.white)); bm.save(context.response.outputstream, system.drawing.imaging.imageformat.gif); }
Comments
Post a Comment