We help IT Professionals succeed at work.

When Printing Barcode I get a + between each letter. Why?

Millkind
Millkind asked
on
Medium Priority
188 Views
Last Modified: 2010-04-23
      When I print a barcode that is all numbers everything is fine
       Print it with all letter or letters and numbers I get +'s in with the characters like happy is h+a+p+p+y
       Any ideas why?


        Dim PrintFont = New Font("Free 3 of 9 Extended", 28)
        Dim yPos As Single = 100
        Dim leftMargin As Single = e.MarginBounds.Left
        Dim BarCodeIn As String = "*" & BarCodeDataIn.Text & "*"
        e.Graphics.DrawString(BarCodeIn, PrintFont, Brushes.Black, leftMargin, yPos, New StringFormat)
Comment
Watch Question

Commented:
I'm not sure why you're getting this +'s - it can be even related to the drivers for your barcode scanner and you wouldn't have too much control over it...

Nevertheless, you can try this: "*" & BarCodeDataIn.Text.Replace( "+", "" ) & "*"

and it will at least remove all +'s from your barcode

good luck,
yurich

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I used the code and still got the +'s which lead me to believe my font i downloaded was bad.  Found a new one and it works great.  Thanks for your help narrowing the problem.

Commented:
glad you sorted it out
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.