Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP TO ADJUST THE BARCODE WIDTH

Status
Not open for further replies.

avboss

Programmer
Sep 24, 2003
3
IN
I am developing a report to print bills in D2K
i wanted to print a barcode in all my bills on the field
"bill_no"
I have managed to procure the following string :

['^PY'||'^M0202000^T005^IFONT,S,1^G^IBARC,C128,N,'||bill_no||'^PN']

The barcode is printed OK, but the problem is I am not able
to adjust the width of my barcode.

I am a novice, still i did some r&d and was able to manipulate the height of the barcode with the two digits after ^M, but the "WIDTH" - no luck.

Can some body help
 
A barcode has to have a certain ratio to work correctly.
So you can’t just “Squeeze” it up.
You can probably make it shorter in height and that should also make it shorter in length
But you don’t want to make it too small so it won’t scan.
Remember a barcode is the white lines the light from the scanner reflects off the white of the paper and the black is a mask so the white spaces need to be legible and clean to work.


DougP, MCP
 
Thanks Doug, for the response.

However, I have seen my peers printing a barcode of the
same height but at 2/3 the width of my barcode.

I would like to know if anyone has come across such string
or anyone who can interpret the string for me as I draw a
big naught as far as printer escape sequences go


 
Thanks Doug, for the response.

However, I have seen my peers printing a barcode of the
same height but at 2/3 the width of my barcode in a VB application.

I would like to know if anyone has come across such string
or anyone who can interpret the string for me as I draw a
big naught as far as printer escape sequences go


 
Since the string is basically a series of escape sequences, it is presumably peculiar to the manufacturer of the target printer. If so, then doesn't their documentation explain what to do?

How did you arrive at that string in the first place? You say you "procured" it; does that mean you got hold of a working string somewhere and put your data field in? If that's the case, there will possibly be other codes you don't know about since they weren't in your example. Maybe there's a ^W or something for the width?

Alternatively, not knowing your printer, is it possible that there's a hard setting on the printer for the width? Maybe a dip switch setting, or a rotary switch somewhere?

Or, since there's reference to the font in the string, could it be that the printer has a number of different fonts and you have to call out the right one for the width? (It makes sense that the string could set the height, since that just means "repeating" the barcode the right number of times to make a short or tall code, while the width could reasonably be expected to be a characteristic of the font itself.)

But I speak in ignorance of what kind of printer you have!

HTH.....


Jim Brown,
Johannesburg,
South Africa.
My time is GMT+2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top