Google Groups Home
Help | Sign in
Message from discussion 128C barcode human readable overlaps
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
terry.bur...@gmail.com  
View profile
 More options 7 Dec 2006, 20:56
From: terry.bur...@gmail.com
Date: Thu, 07 Dec 2006 12:56:34 -0800
Local: Thurs 7 Dec 2006 20:56
Subject: Re: 128C barcode human readable overlaps

coyotegrin wrote:
> I am building a code 128C barcode with BWIPP, but ran across a little
> problem when using a human readable with a font size larger than the
> default one.  The human readable for this barcode seems to be shown in
> digit pairs (as per the 128c encoding) but these pairs of digits
> overlap one another when I raise the font size, using the following
> code:

> 200 200 moveto (^1050123456789) (includetext textsize=14) code128
> barcode

Hi,

You are doing nothing wrong and the effect that you are observing is
intended. However, you can plot the text so that it does not overlap
using code similar to than below:

Hope this helps,

Tez

----

gsave
200 200 translate

% encode the symbol as normal but without displaying text
0 0 moveto (^1050123456789) () code128

% plot barcode but keep copy of data structure
dup barcode

% calculate barcode width by summing the bar and space widths
(sbs) get 0 exch {add} forall

% calculate text width
/Helvetica findfont 14 scalefont setfont
(5483-7277-4828) stringwidth pop

% plot the text at coords ( (barcode width - text width) / 2 , -10 )
sub 2 div -10 moveto (0123456789) show

grestore


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google