Hello ,
i am using free 3 of 9 barcode to create a bar code of each student in my DB , the problem that in my card it is not shown as it is supposed to be but as 98777

barCode.PNG

so any one knows how i can solve that or what could be the problem???

Thanks

Small world. Long ago I used a barcode font. So for the report I only had to change fonts, then output my data and then change the font back.

I don't see your code so I'll want for more detail and maybe the code in question from you.

I am uisng in my asp net string builder and i am generating for each person in DB a card so i will show you here my c# code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace System.Backend
{
    public partial class PersonsCardsView : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["lstFields"] != null)
            {
                List<string> lstIds = (List<string>)Session["lstFields"];
                PersonManagement personManagement = new PersonManagement();
                var personsInfo = personManagement.GetByIds(lstIds).ToList();
                StringBuilder str = new StringBuilder();
                int count = 0;
                if (personsInfo != null && personsInfo.Count > 0)
                {
                    foreach (var person in personsInfo)
                    {
                        string[] name = person.PersonName.Split(' ');
                        if (name.Length > 2)
                        {
                            #region Divs Header
                            if (count % 10 == 0 )
                                str.Append("<div class='break'>");
                            if (count % 2 == 0)
                                str.Append("<div class='dvRight'>");
                            else
                                str.Append("<div class='dvLeft'>");
                            #endregion
                            str.Append("<table dir='rtl' style='padding-top:20px;padding-right:5px;padding-left:5px' >");
                            str.Append("<tr><td>");
                            str.Append("<table celpadding='2' style='font-weight: bold' width='230px'>");
                            str.Append("<tr><td>الاسم : " + name[0] + " " + name[1] + " " + name[2] + "</td></tr>");
                            str.Append("<tr><td style='padding-top:8px'>الكود : " + person.PersonCode + "</td></tr>");
                            str.Append("</table></td>");
                            str.Append("<td>");
                            if (!string.IsNullOrEmpty(person.Image))
                                str.Append("<img src='../../Images/S150_150/" + person.Image +
                                           "' style=\"width: 64px;padding-bottom:5px; height: 80px\" />");
                            else
                            {
                                str.Append("<img src='/Images/Blank.PNG' style=\"width: 64px;padding-bottom:5px; height: 80px\" />");
                            }
                            str.Append("</td></tr>");
                            str.Append("<tr><td colspan='2' style='text-align:center'>");
                            str.Append("<span style=\"font-size: 45pt; font-family: 'Free 3 of 9 Regular'\">*" + person.PersonCode +
                                       "*</span>");
                            str.Append("</td></tr>");
                            str.Append(
                                "<img height='70px' src='/QR.ashx?width=70&height=70&QRText=http://athd.me/f.aspx%3Fd%3D" +
                                person.PersonCode + "'/>");
                            str.Append(
                                "<tr><td colspan='2' dir='ltr' align='center' style='font-size:11px'>Scan the QR code to access your account directly via mobile</td></tr>");
                            str.Append("</table>");
                            #region Divs Footer
                            str.Append("</div>");
                            if (count % 10 == 0)
                                str.Append("</div>");
                            count++;
                            #endregion
                        }
                    }

                }
                ltrInfo.Text = str.ToString();
            }
        }

    }
}

I don't see in the code where a barcode font or image builder is used.

How about you share a source for your 7 of 9 barcode system?

commented: Sorry i don't understand , do u want me to shre 9 of the output cards? +0

I notice on line 57 a "http". For almost everywhere, http is gone and does not work. I can't guess line 57's intent but you can either dismiss this as you know what you did there or tell a little more.

As to your comment question. I can't see where the barcode is made in the code given. You either have to tell me which line to look at or better yet tell me where you got this bar code system from. Then I can go to that web site to see how that system works and then back to your code to see if I can tell why there is no bar code.

Now if you are getting bar codes but they decode wrong you would insert DEBUG.PRINT statements to reveal what you are sending the bar code generation code. To wit, not only do we want to see why your post didn't show barcodes but is the number problem cause in your code or the bar code generation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.