Click here to Skip to main content
12,445,907 members (72,987 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0
Hello ,

I've developing a C# app and I'm in a point where I need to change my text to barcodes
and print it

How can I do it?
Posted 17-Nov-12 23:20pm
Comments
Nelek 18-Nov-12 5:46am
   
Please don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.
what have you tried?[^]
Member 8584763 18-Nov-12 5:52am
   
I developing point of sale app and I need to print invoice and the invoice must has barcode which is invoice Id?

How can I convert invoice Id to barcode Image?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

There are quite a few different ways to do this. You can write your own barcode generator, use existing libraries or get a barcode font. Try some of these Googled links[^].
  Permalink  
Comments
Member 8584763 18-Nov-12 6:23am
   
I've barcode font how can I apply it to textbox?
Richard MacCutchan 18-Nov-12 6:43am
   
Try the Font property.
Member 8584763 18-Nov-12 6:47am
   
how to can I use it?
Richard MacCutchan 18-Nov-12 6:57am
   
No idea, what are you trying to do?
Member 8584763 18-Nov-12 7:28am
   
I read online if you have a barcode font you can apply it to the text the you have. But I've never used barcode font?
My question is how to use it?
Richard MacCutchan 18-Nov-12 7:39am
   
It's just the same as any other font. Select that font into your control's font property, and all character sent to the control will appear in that font. The same principle applies to printing information. If the font has any specific requirements or options then you need to consult the documentation that comes with it.
Member 8584763 18-Nov-12 7:52am
   
how can I you add it to your project?
Richard MacCutchan 18-Nov-12 8:04am
   
You need to install it on your PC and then it should appear in the font selector of programs that offer these features. Check the properties of the font for the actual family and font names.
Member 8584763 18-Nov-12 8:35am
   
I did and it gave this message
only true type fonts are supported
Richard MacCutchan 18-Nov-12 9:26am
   
Without some more information it is not possible to guess what is happening. You need to go back to where you got the font from and look for some documentation.
Member 8584763 18-Nov-12 9:51am
   
I installed it in window/font. Then in visual studio I chose the the font that I added and it gave me this message.
only true type fonts are supported
Richard MacCutchan 18-Nov-12 10:21am
   
Added it where? Please try and explain things clearly, and look at what you are trying to do, and what steps you have followed. Is there a reason why only a TrueType font is allowed in the situation you are working on? I cannot see your screen or guess what is happening on your PC.
Member 8584763 18-Nov-12 10:45am
   
When I installed the font on my PC. I tried using in notepad and it works, but when visual studio I tried to change the font propriety for a textbox ,it gave this message
only true type fonts are supported . what do you think the problem?
Richard MacCutchan 18-Nov-12 11:00am
   
I think the 'problem' may be a bug in VS. Take a look at some of these links.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

As I understand, you want to print the barcode in an invoice and the barcode will be the invoice ID. This I believe is relatively easy.
There are a lot of articles about how to read/write barcodes.
You can implement your own code to generate a barcode or you can use a library for that.
If you want to use a library, you can use either a commercial library or a free library.
I worked on a solution a while back that used a library called leadtools that was easy to use and fast.
I found the following links that I think might help you.
Barcode Image Generation Library
Write barcode tutorial
SourceForge barcode library
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 May 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100