Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am not able to reduce width less than 134 pixel,
i tried reducing width by reducing generated barcode width it became blurred a bit and unreadable.

i also tried using font code-128 but it didn't worked generated barcode is not readable in required size.

i used font code 128 font and i used IDAutomation(its too costaly) thats paid i am not allowed for paid solution

and i used zxing.net open source lib. but its not containing in 100 pixel.



i wonder how phone companies get phones IMEI no . in such a small size around 100 pixel.

i can i do that.
please help me.
Posted

1 solution

It gets fuzzy because you're using a font to come up with the image of a barcode. PROPERLY draw the barcode yourself and you won't have that problem.

Check this: GenCode128 - A Code128 Barcode Generator[^].

But, keep in mind that the smaller you make the barcode, the harder it is to keep the proper spacing between the bars and the width of bars to the required distances.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 9-Jan-16 11:56am    
Agree, a 5.
—SA
varun150 11-Jan-16 0:16am    
i used 'zxing.net' to draw barcode
http://zxingnet.codeplex.com/
but it makes 15 character string 134 pixel wide,apart of zxing i found no library which can draw barcode in vary small width(90-100 pixel 15 chars).

mostly online library has parameters for barcode height,bar weight,margin
i have no clue how to contain it in less width.
varun150 11-Jan-16 7:22am    
L = (11 * C + 35) * X
where:
L = Overall length (not including Quiet Space)
C = Number of DATA characters (not including START, CHECK, or STOP)
X = length of x-dimension

Example: Code128 -> C = 7, X = 0.010"
L = (11 * 7 + 35) * 0.010” = 1.120” without Quiet Zones
or 1.120” + 2 * Max(10 * 0.010”, 0.25”) = 1.370” with Quiet Zones

Example: Code128Barcode -> C = 14, X = 0.010"
L = (11 * 14 + 35) * 0.010” = 1.890” without Quiet Zones
or 1.890” + 2 * Max(10 * 0.010”, 0.25”) = 2.140” with Quiet Zones
http://www.precisionid.com/code128-barcode-faq.aspx

according to this formula we can set barwidth to 0.010 but problem is how to draw an image out of it
it takes all integer values to draw a rectagular bar .
Grafics.DrawRectangle()
https://msdn.microsoft.com/en-us/library/system.drawing.graphics.fillrectangle(v=vs.110).aspx


this software gives flexibility to adjust width like i want
http://www.barcodemaking.com/

it lets you reduce width by specifying width in mills. or pixels ,i want something like that.
Dave Kreskowiak 11-Jan-16 8:56am    
I can't tell you anything beyond what I already have. If you want a custom solution that no library can provide you have to write one yourself. This is what I've already told you.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900