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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RIGHT JUSTIFY A BARCODE ? 1

Status
Not open for further replies.

saustin

MIS
Feb 19, 2001
336
0
0
US
Hi,
Have used VB to right justified text nicely with Printer.CurrentX = (5370 - (Printer.TextWidth(frmRollsRoyce.txt4)). But am having difficulty doing this with barcode (code39e). Have added a multiplication factor like 1.2 and it comes out perfectly with alpha numeric data but it is off if it is just alpha data in the barcode. The width of the barcode is not uniform perhaps due to font.

Any suggestions greatly appreciated.

Thanks, Steve.
 
3of9 should be fixed pitch.

Jim Asman
jlasman@telus.net
 
Thanks for the reply Jim ! Will switch from Code39e to just code39 and test it out and report back. Steve.
 
Hi Jim,
Switched to Code39One but with no change. Have realized that when the font size is set to 16 the proportion is about 1 char to 1/8 of an inch. Just need to work on my math a little to make this come out close. This should be possible

Thanks again, Steve.
 
Something is wierd here.

The name 3of9 means that each character contains 9 bars, 3 of which are wide(same width), and the other 6 are narrow(same width). Thus ALL characters are the same width.

Maybe the font has wider white bars than black bars to allow for some bleed of the black bars.

Jim Asman
jlasman@telus.net
 
Hi Jim,
Mission accomplished. Found the character width to be a consistent 177 pixels with 16 font size. Here is the
final vb code for RIGHT JUSTIFYING a barcode. It is just a matter of playing with the x coordinate to determine final location.

Printer.CurrentX = (5020 - (Printer.TextWidth(frmROCN.txt4)))

Many thanks, Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top