-1
DataTable dt = (DataTable)Session["Generate"];
System.Drawing.Font printFont = new System.Drawing.Font("3 of 9 Barcode", 9);

System.Drawing.SolidBrush br = new System.Drawing.SolidBrush(System.Drawing.Color.Red);

string s = Server.MapPath(@"../images/112983627");
System.Drawing.GraphicsUnit units = System.Drawing.GraphicsUnit.Pixel;
e.Graphics.DrawString(s, new System.Drawing.Font("3 of 9 Barcode", 9, System.Drawing.FontStyle.Regular), new System.Drawing.SolidBrush(System.Drawing.Color.Black), 10, 200);
ADyson
  • 44,946
  • 12
  • 41
  • 55
  • Please explain what you want, just don't paste code and expect us to do everything for you! – Emiliano Montesdeoca Jul 25 '18 at 12:54
  • did you have a question you wanted to ask? We don't understand why you posted this code or what you want anyone to tell you. – ADyson Jul 25 '18 at 12:55
  • i want to print barcode on zebra printer which is able to scan – Ashhar Javed Jul 25 '18 at 13:01
  • image is printed but not scanning printed image – Ashhar Javed Jul 25 '18 at 13:03
  • When you created this post, the button you clicked said "Ask question"...but "I want to" is not a _question_. Why did you post this code? Is there a problem with it? You will have to explain more specific details about your requirement, and also more exact details about the issue / error you are facing before we can help you. Don't assume we have any prior knowledge of your application, your requirements, or other details such as what kind of device a "zebra" printer might be. We cannot read your screen, your disk or your mind. All we have got is what is shown above. – ADyson Jul 25 '18 at 13:03
  • If you haven't already, you should read https://stackoverflow.com/help/how-to-ask to understand how to structure your post in a way that will allow people to help you. We want to help you, but right now we do not have enough information to do so. – ADyson Jul 25 '18 at 13:05
  • @AshharJaved you will probably need to set font to be larger. Also, adjust the printer settings regarding printing speed (lower = better) and ink usage (put it little higher, so printed barcode is not pale). 3rd thing to check is your barcode reader, maybe it's not set to read 3 of 9 barcodes, and need some additional setup. These are all suggestions from experience, had such situations in past – Caldazar Jul 25 '18 at 14:02

1 Answers1

0

As far as printing barcode image from string, you can refer to zxing (Zebra Crossing) c# open source library to generate Bar code / QR code image from string https://github.com/zxing/zxing

And refer to below thread as well Using ZXing to create an android barcode scanning app